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

How to use nginx to configure domain names to forward shadowsocks ports #3003

Open
xiuxiumomo opened this issue Dec 19, 2024 · 0 comments
Open

Comments

@xiuxiumomo
Copy link

Please answer these questions before submitting your issue. Thanks!

(Please mention that if the issue you filed is solved, you may wish to close it by yourself. Thanks again.)

(PS, you can remove 3 lines above, including this one, before post your issue.)

What version of shadowsocks-libev are you using?

latest

What operating system are you using?

centos7.x

What did you do?

I successfully deployed with docker, but I wanted to configure the domain name for access instead of the IP address so I didn't expose my port number

docker run -d -p 8989:8989 -p 8989:8989/udp --name ss-libev -v /etc/shadowsocks-libev:/etc/shadowsocks-libev appso/shadowsocks-libev

server {
    listen 80;

	
	server_name  sxx.com;

	
	location / {
		proxy_pass http://127.0.0.1:8989; 
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
	}

}

What did you expect to see?

I used ip+ port number on the client to successfully proxy, but I changed to the domain name +80 port can not access

What did you see instead?

i can use domain+80 port

What is your config in detail (with all sensitive info masked)?

{
"server":"0.0.0.0",
"server_port":8989,
"password":"mypass",
"timeout":300,
"method":"aes-256-gcm",
"fast_open":false,
"nameserver":"8.8.8.8",
"mode":"tcp_and_udp",
"plugin":"obfs-server",
"plugin_opts":"obfs=http"
}

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

No branches or pull requests

1 participant