initial commit: standalone SoftEther VPN client in Go
Built-in DHCP (raw Ethernet frames through tunnel), automatic reconnection, host route management, classless static routes (option 121/249), DNS config. Single static binary, Linux only. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
commit
829ca73b1b
340 changed files with 199140 additions and 0 deletions
54
docs/building.md
Normal file
54
docs/building.md
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
# Building
|
||||
|
||||
## Go
|
||||
|
||||
Requires Go 1.24 or later.
|
||||
|
||||
```bash
|
||||
go build -o softether-go ./cmd/softether-go/
|
||||
```
|
||||
|
||||
### Static binary
|
||||
|
||||
For deployment in minimal containers (Alpine, scratch) or systems without glibc:
|
||||
|
||||
```bash
|
||||
CGO_ENABLED=0 go build -o softether-go ./cmd/softether-go/
|
||||
```
|
||||
|
||||
### Cross-compilation
|
||||
|
||||
```bash
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o softether-go ./cmd/softether-go/
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o softether-go ./cmd/softether-go/
|
||||
```
|
||||
|
||||
Only Linux targets are supported (the TAP device interface uses Linux-specific ioctls).
|
||||
|
||||
## Nix
|
||||
|
||||
Build with the flake:
|
||||
|
||||
```bash
|
||||
nix build
|
||||
```
|
||||
|
||||
The result is in `./result/bin/softether-go`.
|
||||
|
||||
Enter a development shell with Go tooling:
|
||||
|
||||
```bash
|
||||
nix develop
|
||||
```
|
||||
|
||||
Build within the dev shell:
|
||||
|
||||
```bash
|
||||
nix develop -c bash -c 'go build -o softether-go ./cmd/softether-go/'
|
||||
```
|
||||
|
||||
## Dependencies
|
||||
|
||||
The only Go dependency is `golang.org/x/sys` for Linux syscall constants (TUN/TAP ioctls). Dependencies are vendored in `vendor/`.
|
||||
|
||||
At runtime, the only external dependency is `ip` (iproute2) for route and address management.
|
||||
Loading…
Add table
Add a link
Reference in a new issue