Skip to content

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

Open
@xiuxiumomo

Description

@xiuxiumomo

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"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions