Skip to content

Add SNI Proxy support - #210

Merged
windtf merged 5 commits into
windtf:masterfrom
robvanoostenrijk:sni-proxy
Jun 26, 2026
Merged

Add SNI Proxy support#210
windtf merged 5 commits into
windtf:masterfrom
robvanoostenrijk:sni-proxy

Conversation

@robvanoostenrijk

Copy link
Copy Markdown
Contributor

Pull request to add TLS (SNI) proxy support.

This allows using Wireproxy on local LAN to easily tunnel traffic through Wireguard based on DNS name.
By overriding the local DNS server to return the LAN IP of the Wireproxy instance, the traffic to that domain will be routed via the Wireguard tunnel.

  1. Wireproxy receives traffic on the SNI proxy port (usually 443)
  2. Wireproxy uses crypto/tls to do a read-only TLS connection to receive only the TLS client HELLO package.
  3. The TLS client HELLO packet is inspected for the SNI extension. If found, the destination hostname is extracted.
  4. Wireproxy connects to the destination hostname on port 443 (SNI extensions only carry hostname, not a target port)
  5. Wireproxy then replays the initial TLS client HELLO package and establishes the TLS tunnel over TCP to the target
  6. TCP connection tunnel is persistent until closed by client or server

Configuration Format:

[SNI]
BindAddress = 192.168.10.26:443

Example:

curl --resolve 'ifconfig.me:443:127.0.0.1' https://ifconfig.me/

This would return the Wireguard tunnel public IP through HTTPS connection with ifconfig.me

@robvanoostenrijk
robvanoostenrijk marked this pull request as ready for review June 18, 2026 06:52
@windtf
windtf merged commit 10f4bba into windtf:master Jun 26, 2026
10 checks passed
@robvanoostenrijk
robvanoostenrijk deleted the sni-proxy branch June 27, 2026 03:37
CatDonIO pushed a commit to CatDonIO/wireproxy-awg that referenced this pull request Aug 14, 2026
Brings in everything from the base project up to v1.1.3:

- SNI (transparent TLS) proxy section (windtf#210)
- bare WGConfig filenames are resolved relative to the parent config dir (windtf#204)
- landlock: TCPClientTunnel BindAddress is now BindTCP, not ConnectTCP (windtf#219)
- landlock: TLS cert/key files are added to the allowed read paths (windtf#213)
- dependency bumps (x/net 0.55.0, x/crypto 0.52.0, x/sys 0.45.0)

Conflicts resolved in favour of the fork:

- go.mod/go.sum keep amneziawg-go and drop the direct golang.zx2c4.com/wireguard
  dependency; every shared dependency takes the newer of the two versions
- cmd/wireproxy/main.go keeps the wireproxyawg import alias and takes the
  upstream landlock fix
- README keeps the fork feature list and install path, and adds the SNI section

The upstream sponsor blocks (IPCook affiliate banner, DigitalOcean credits) and
assets/ipcook.png are not carried into the fork - they point at the base
project's referral code and sponsorship, which do not apply here.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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