shadowsocks / shadowsocks-windows

A C# port of shadowsocks
Other
58.09k stars 16.4k forks source link

求助,域名制定了hosts后,在代理状态下无法访问 #3396

Open DuckulA opened 1 year ago

DuckulA commented 1 year ago

简要描述问题

环境

操作步骤

公司要求,将公司后台网址在hosts中指定到了特定的ip,日常可以正常使用。但打开Shadowsocks代理后,无论是PAC还是全局,该域名都无法正常打开,会显示500错误。

【500 Internal Privoxy Error Privoxy encountered an error while processing your request:

Could not load template file no-server-data or one of its included components.

Please contact your proxy administrator.

If you are the proxy administrator, please put the required file(s)in the (confdir)/templates directory. The location of the (confdir) directory is specified in the main Privoxy config file. (It's typically the Privoxy install directory).】

直接打开ip是能用的,但是由于公司服务器设置,直接用ip无法登录,只能通过域名登录。

期望的结果

在打开Shadowsocks代理的情况下,该域名也能正常使用。

实际结果

现在无法使用

配置文件和日志文件(请隐去敏感信息)

代理和后台都是公司内部的,就不透露了。

2023-04-07 11:12:58.2482|DEBUG|Shadowsocks.Controller.TCPHandler|connect to api.github.com:443
2023-04-07 11:12:58.3000|DEBUG|Shadowsocks.Controller.TCPHandler|Socket connected to ss server: (代理服务器网址)
2023-04-07 11:12:59.2645|DEBUG|Shadowsocks.Controller.TCPHandler|connect to (公司后台服务器网址)
2023-04-07 11:12:59.3143|DEBUG|Shadowsocks.Controller.TCPHandler|Socket connected to ss server: (代理服务器网址)
2023-04-07 11:13:20.4322|DEBUG|Shadowsocks.Controller.TCPHandler|connect to github.com:443
2023-04-07 11:13:20.4891|DEBUG|Shadowsocks.Controller.TCPHandler|Socket connected to ss server: (代理服务器网址)
2023-04-07 11:13:52.0250|DEBUG|Shadowsocks.Controller.TCPHandler|connect to tile-service.weather.microsoft.com:80
2023-04-07 11:13:52.0730|DEBUG|Shadowsocks.Controller.TCPHandler|Socket connected to ss server: (代理服务器网址)
chenshaoju commented 1 year ago

在 Shadowsocks.exe 所在目录下有个user-rule.txt文件,双击打开,添加一行: @@||example.com

将 example.com 替换为你的网址,如: @@||sina.com.cn

注意,为半角符号,不是全角的: image

DuckulA commented 1 year ago

在 Shadowsocks.exe 所在目录下有个user-rule.txt文件,双击打开,添加一行: @@||example.com

将 example.com 替换为你的网址,如: @@||sina.com.cn

注意,为半角符号,不是全角的: image

非常感谢……而且如此简单的就解决了。本来我也是知道要改个文件,但不知道具体怎么改,问了New bing,都是车轱辘话让我改防火墙……问了公司IT,他居然说这就是规则,想用后台就关掉代理……我晕…

谢谢~