TyrantLucifer / ssr-command-client

:airplane:The commend client of ssr based Python3
Apache License 2.0
978 stars 240 forks source link

请问目录是否有办法手动设置某域名不使用代理 #91

Open volgachen opened 1 year ago

volgachen commented 1 year ago

目标域名:huggingface.co 开启代理时,python代码内访问会出现如下错误:

MaxRetryError: SOCKSHTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: 
/Salesforce/blip-image-captioning-base/resolve/main/preprocessor_config.json (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol 
(_ssl.c:997)')))
volgachen commented 1 year ago

更新:

1、环境变量NO_PROXY可以有用。

os.environ['NO_PROXY'] = 'huggingface.co'

2、在vmess2json.py里面手动添加routing失败

      {
        "type": "field",
        "domain": [
          "geosite:cn",
          "huggingface.co"
        ],
        "outboundTag": "direct"
      }
volgachen commented 1 year ago

更新:

curl命令和ssr似乎有一些冲突,会出现以下报错:

> curl https://api.openai.com/v1/completions [ADDITIONAL_ARGS]
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to api.openai.com:443

可以通过配置~/.curlrc文件解决: socks5-hostname = "127.0.0.1:1080"

请问大家这里的底层逻辑是什么?