Add support for Wireguard over TCP using mullvad's method of UDP tunneling over TCP #1120

Closed
opened 2025-11-20 05:24:24 -05:00 by saavagebueno · 4 comments
Owner

Originally created by @shadow2399 on GitHub (Aug 1, 2024).

Is your feature request related to a problem? Please describe.
Wireguard traffic when inspected by an ISP or some other entity monitoring traffic screams itself out with almost no obsfucation. Yes, the traffic is still encrypted, but there's nothing stopping an ISP from simply blocking the traffic in bad-acting countries.

Describe the solution you'd like
Integrate TCP based wireguard by tunneling UDP over TCP connections. Look at mullvad vpn's source code for integration reference:
https://github.com/mullvad/mullvadvpn-app

Describe alternatives you've considered
Simply not integrating it due to challenges.

Additional context
This method is likely going to be very slow, but make it a configurable advanced option that could help a user out if they need it. This will help with issue #1096's ISP blocking of netbird traffic.

Originally created by @shadow2399 on GitHub (Aug 1, 2024). **Is your feature request related to a problem? Please describe.** Wireguard traffic when inspected by an ISP or some other entity monitoring traffic screams itself out with almost no obsfucation. Yes, the traffic is still encrypted, but there's nothing stopping an ISP from simply blocking the traffic in bad-acting countries. **Describe the solution you'd like** Integrate TCP based wireguard by tunneling UDP over TCP connections. Look at mullvad vpn's source code for integration reference: https://github.com/mullvad/mullvadvpn-app **Describe alternatives you've considered** Simply not integrating it due to challenges. **Additional context** This method is likely going to be very slow, but make it a configurable advanced option that could help a user out if they need it. This will help with issue #1096's ISP blocking of netbird traffic.
saavagebueno added the feature-request label 2025-11-20 05:24:24 -05:00
Author
Owner

@lixmal commented on GitHub (Aug 1, 2024):

We already have wireguard over tcp when using relay with a tcp enabled turn server. It can be forced by using the env var NB_ICE_FORCE_RELAY_CONN=true on the client

Is that of any help?

@lixmal commented on GitHub (Aug 1, 2024): We already have wireguard over tcp when using relay with a tcp enabled turn server. It can be forced by using the env var `NB_ICE_FORCE_RELAY_CONN=true` on the client Is that of any help?
Author
Owner

@shadow2399 commented on GitHub (Aug 1, 2024):

Yeah I think that covers it then. Thanks for your help!

@shadow2399 commented on GitHub (Aug 1, 2024): Yeah I think that covers it then. Thanks for your help!
Author
Owner

@PRNDA commented on GitHub (Aug 20, 2024):

We already have wireguard over tcp when using relay with a tcp enabled turn server. It can be forced by using the env var NB_ICE_FORCE_RELAY_CONN=true on the client

Is that of any help?

Is this supported by iOS/macOS clients? Are there any docs about this?

@PRNDA commented on GitHub (Aug 20, 2024): > We already have wireguard over tcp when using relay with a tcp enabled turn server. It can be forced by using the env var `NB_ICE_FORCE_RELAY_CONN=true` on the client > > Is that of any help? Is this supported by iOS/macOS clients? Are there any docs about this?
Author
Owner

@willcipher commented on GitHub (Jul 4, 2025):

Is this supported by iOS/macOS clients? Are there any docs about this?

Not sure if you found your answer elsewhere, but here's the (hack) workaround I'm using:

sudo cp /Library/LaunchDaemons/netbird.plist /Library/LaunchDaemons/netbird.plist.orig
sudo nano /Library/LaunchDaemons/netbird.plist

I inserted an EnvironmentVariables key (context shown above and below):

...
	<key>Label</key>
	<string>netbird</string>
	<key>EnvironmentVariables</key>
	<dict>
		<key>NB_FORCE_RELAY</key>
		<string>true</string>
	</dict>
	<key>ProgramArguments</key>
...

Then...

sudo launchctl unload /Library/LaunchDaemons/netbird.plist
sudo launchctl load /Library/LaunchDaemons/netbird.plist

Subsequently, my Mac used only the relay for all connections.

I'm using NB_FORCE_RELAY due to this suggestion: Force relay connection not working

Not sure how to accomplish this on iOS.

@willcipher commented on GitHub (Jul 4, 2025): > Is this supported by iOS/macOS clients? Are there any docs about this? Not sure if you found your answer elsewhere, but here's the (hack) workaround I'm using: ``` sudo cp /Library/LaunchDaemons/netbird.plist /Library/LaunchDaemons/netbird.plist.orig sudo nano /Library/LaunchDaemons/netbird.plist ``` I inserted an **EnvironmentVariables** key (context shown above and below): ``` ... <key>Label</key> <string>netbird</string> <key>EnvironmentVariables</key> <dict> <key>NB_FORCE_RELAY</key> <string>true</string> </dict> <key>ProgramArguments</key> ... ``` Then... ``` sudo launchctl unload /Library/LaunchDaemons/netbird.plist sudo launchctl load /Library/LaunchDaemons/netbird.plist ``` Subsequently, my Mac used only the relay for all connections. I'm using `NB_FORCE_RELAY` due to this suggestion: [Force relay connection not working](https://github.com/netbirdio/netbird/issues/4063#issuecomment-3013544805) Not sure how to accomplish this on iOS.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#1120