Skip to content

Add OpenBSD build support#1163

Closed
byteonabeach wants to merge 1 commit into
tobychui:mainfrom
byteonabeach:add-openbsd-support
Closed

Add OpenBSD build support#1163
byteonabeach wants to merge 1 commit into
tobychui:mainfrom
byteonabeach:add-openbsd-support

Conversation

@byteonabeach
Copy link
Copy Markdown

Building Zoraxy on OpenBSD 7.8 (amd64) fails because the sshprox package uses symbols UseWinTTY and gotty that are only defined in files with build tags that exclude OpenBSD.

The error is:
mod/sshprox/sshprox.go:67:5: undefined: UseWinTTY
mod/sshprox/sshprox.go:109:5: undefined: UseWinTTY
mod/sshprox/sshprox.go:148:20: undefined: gotty
mod/sshprox/sshprox.go:155:22: undefined: gotty
mod/sshprox/sshprox.go:209:5: undefined: UseWinTTY
mod/sshprox/utils.go:24:5: undefined: UseWinTTY
mod/sshprox/utils.go:36:12: undefined: gotty

I add a single file, src/mod/sshprox/sshprox_openbsd.go, with the build constraint //go:build openbsd. It defines UseWinTTY = false and provides an embedded filesystem for the gotty directory. No existing files are modified.

After the change the package compiles and the binary links on OpenBSD. The gotty executable for OpenBSD is not embedded, so the SSH proxy feature will still return "platform not supported" at runtime. This PR only addresses the build breakage.

@byteonabeach byteonabeach requested a review from tobychui as a code owner May 6, 2026 03:13
@tobychui
Copy link
Copy Markdown
Owner

tobychui commented May 6, 2026

Hey @byteonabeach

This PR only addresses the build breakage.

Yes, this is exactly what I want to say. The better way to do this is just set UseWinTTY to true and use the Zoraxy internal tty terminal feature instead. Maybe you can reference sshprox/embed_windows_amd64.go and modify the OpenBSD version accordingly?

Copy link
Copy Markdown
Owner

@tobychui tobychui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As previous comment, please use the internal WinTTY feature instead.

@tobychui
Copy link
Copy Markdown
Owner

Well since OpenBSD is not in our supported list and this only solved compile issue (function still unusable after this patch), I think I better close this. Currently there is no plan to support OpenBSD officially, but feel free to maintain a community port for this if needed.

@tobychui tobychui closed this May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants