Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UDP: Bind a separate service to each interface #109

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

bemasc
Copy link

@bemasc bemasc commented Dec 24, 2021

As discussed in #106, a UDP socket bound to 0.0.0.0 results in
pathological behavior when there are multiple interfaces of the same
address family. This change binds a separate instance of the UDP
service to each interface IP, ensuring that outbound Shadowsocks packets
have the expected source IP.

As discussed in #106, a UDP socket bound to 0.0.0.0 results in
pathological behavior when there are multiple interfaces of the same
address family.  This change binds a separate instance of the UDP
service to each interface IP, ensuring that outbound Shadowsocks packets
have the expected source IP.
@database64128
Copy link

Network interfaces can change after the server started. It's difficult and a bit unrealistic to keep track of future changes.

@bemasc
Copy link
Author

bemasc commented Dec 24, 2021

Are you aware of a situation where it would be important to serve Outline on an interface that did not exist when the Outline daemon started?

Note that SIGHUP, which causes Outline to reload the config file (e.g. when a new key is added), also would cause it to re-scan the system's interfaces, so it is possible for the management layer to expand coverage to additional interfaces if it knows that they have been added.

@database64128
Copy link

database64128 commented Dec 24, 2021

Are you aware of a situation where it would be important to serve Outline on an interface that did not exist when the Outline daemon started?

Some of my deployments are on home networks where the interface IPs change irregularly. Some user-space VPN services like OpenVPN may also finish starting after Outline.

@bemasc
Copy link
Author

bemasc commented Dec 24, 2021

OK, dynamic IPs are an interesting case. This approach would fail in that case, because it binds directly to the IPs, rather than to the interfaces. Outline generally assumes static IPs, but Shadowsocks could be deployed using dynamic IPs and a rendezvous mechanism (e.g. dynamic DNS).

@sbruens sbruens closed this Mar 5, 2024
@sbruens sbruens deleted the exp-bind branch March 5, 2024 22:57
@fortuna fortuna restored the exp-bind branch March 6, 2024 16:42
@fortuna
Copy link

fortuna commented Mar 6, 2024

This is another thing we need to fix

@fortuna fortuna reopened this Mar 6, 2024
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.

4 participants