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

Listen on specific interface or IP address #41

Closed
FreedomPrevails opened this issue Nov 3, 2019 · 5 comments
Closed

Listen on specific interface or IP address #41

FreedomPrevails opened this issue Nov 3, 2019 · 5 comments

Comments

@FreedomPrevails
Copy link

Hey guys,
How can I configure the server to listen on a specific interface or IP address ?

@alalamav
Copy link

Hi @FreedomPrevails, currently the server will listen on the any address (0.0.0.0), meaning it will listen on all available interfaces. The server will listen on all ports specified in the config file.

What is your use case to listen on a particular IP/interface?

@fortuna
Copy link

fortuna commented Oct 27, 2020

I guess we could provide a flag for that. We haven't done it because it wasn't a need for Outline.

This is where we would set the address:

func (s *SSServer) startPort(portNum int) error {
listener, err := net.ListenTCP("tcp", &net.TCPAddr{Port: portNum})
if err != nil {
return fmt.Errorf("Failed to start TCP on port %v: %v", portNum, err)
}
packetConn, err := net.ListenUDP("udp", &net.UDPAddr{Port: portNum})

You can fork our main as a workaround

@zykrah
Copy link

zykrah commented May 22, 2023

Hi there, I was wondering whether or not there was a plan to implement this feature. My main use case is that only the 443 TCP port seems to work with my access key, however, I have other applications (a website through an nginx reverse proxy) utilizing the port 443. I thought i'd be able to just get another IP address, and then run nginx on one, and Outline on the other, however that doesn't seem to be possible as Outline seems to be attempting to listen to 0.0.0.0, so it always errors if any other app is already listening on that port, even if it's only listening to a specific IP.

@fortuna
Copy link

fortuna commented Jun 6, 2023

I believe we can implemented in the config with something like:

keys:
  - id: user-0
    ip: 1.2.3.4
    port: 9000
    interface: eth0
    cipher: chacha20-ietf-poly1305
    secret: Secret0

@maddyhof
Copy link

Closing as duplicate of #19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants