如何为影子袜子配置第二台IP服务器?

问题描述 投票:0回答:1

我有一个具有默认IP的VPS,该IP已配置了shadowsocks,并且工作正常。现在,我需要为此配置第二个IP服务器,并在浏览器中将第二个IP显示为客户端IP。当我在shadowsocks设置(台式机版)中更改IP时,它可以工作,但浏览器仍将默认IP服务器显示为客户端IP。我能做什么?感谢您的帮助

centos7 vpn vps socks proxy-server
1个回答
0
投票

-b local_address-指定此服务器代表客户端与远程服务器建立

outbound连接时要使用的本地地址。

例如,如果您有2个IP地址192.168.1.11和192.168.1.12:

/usr/bin/ss-server -b 192.168.1.12

现在您可以连接到192.168.1.11或192.168.1.12,并且您的IP将是192.168.1.12。

如果要同时使用两个ip并同时具有两个外部ip,则需要启动两个ss-server并使用-b和-s的组合。

centos systemd的示例:

创建文件/etc/systemd/system/[email protected]

[Unit] Description=Shadowsocks-libev Default Server Service %i Documentation=man:shadowsocks-libev(8) After=network.target network-online.target [Service] Type=simple EnvironmentFile=/etc/sysconfig/shadowsocks-libev User=nobody Group=nobody LimitNOFILE=32768 ExecStart=/usr/bin/ss-server -c "$CONFFILE" -s %i -b %i -d 1.1.1.1 $DAEMON_ARGS CapabilityBoundingSet=CAP_NET_BIND_SERVICE [Install] WantedBy=multi-user.target

使用命令:

systemctl stop shadowsocks-libev
systemctl disable shadowsocks-libev

systemctl start [email protected] [email protected]
systemctl enable [email protected] [email protected]

现在您可以使用多个ip而不更改代码,只需执行命令:

systemctl开始[email protected]

© www.soinside.com 2019 - 2024. All rights reserved.