OreosLab / bili

https://oreos.ml/script/2021-10-15-BILIBILI-HELPER.html
MIT License
136 stars 54 forks source link

使用 PROXY_SOCKET_HOST 代理TG Bot推送时出现错误 #59

Open KCCat opened 1 year ago

KCCat commented 1 year ago
2022-11-29 12:06:59.590 INFO  o.a.h.i.e.RetryExec - I/O exception (org.apache.http.conn.UnsupportedSchemeException) caught when processing request to {tls}->socket://192.168.254.254:1888->https://api.telegram.org:443: socket protocol is not supported
2022-11-29 12:06:59.590 INFO  o.a.h.i.e.RetryExec - Retrying request to {tls}->socket://192.168.254.254:1888->https://api.telegram.org:443
2022-11-29 12:06:59.590 INFO  o.a.h.i.e.RetryExec - I/O exception (org.apache.http.conn.UnsupportedSchemeException) caught when processing request to {tls}->socket://192.168.254.254:1888->https://api.telegram.org:443: socket protocol is not supported
2022-11-29 12:06:59.590 INFO  o.a.h.i.e.RetryExec - Retrying request to {tls}->socket://192.168.254.254:1888->https://api.telegram.org:443
2022-11-29 12:06:59.590 INFO  o.a.h.i.e.RetryExec - I/O exception (org.apache.http.conn.UnsupportedSchemeException) caught when processing request to {tls}->socket://192.168.254.254:1888->https://api.telegram.org:443: socket protocol is not supported
2022-11-29 12:06:59.590 INFO  o.a.h.i.e.RetryExec - Retrying request to {tls}->socket://192.168.254.254:1888->https://api.telegram.org:443
2022-11-29 12:06:59.593 ERROR t.m.u.HttpUtils - 
org.apache.http.conn.UnsupportedSchemeException: socket protocol is not supported
    at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:109)
    at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376)
    at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:401)
    at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
    at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
    at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
    at top.misec.utils.HttpUtils.doPost(HttpUtils.java:89)
    at top.misec.push.AbstractPush.post(AbstractPush.java:103)
    at top.misec.push.AbstractPush.lambda$1(AbstractPush.java:91)
    at io.github.itning.retry.strategy.limit.NoAttemptTimeLimit.call(NoAttemptTimeLimit.java:16)
    at io.github.itning.retry.Retryer.call(Retryer.java:165)
    at top.misec.push.AbstractPush.push2Target(AbstractPush.java:91)
    at top.misec.push.AbstractPush.doPush(AbstractPush.java:73)
    at top.misec.task.ServerPush.doServerPush(ServerPush.java:23)
    at top.misec.task.DailyTask.doDailyTask(DailyTask.java:81)
    at top.misec.BiliMain.main(BiliMain.java:40)
2022-11-29 12:06:59.593 ERROR t.m.p.AbstractPush - 推送返回失败:null 已尝试:1次

使用的是SOCKS5,代理本身工作正常

java -version
openjdk version "19.0.1" 2022-10-18
OpenJDK Runtime Environment (build 19.0.1+10)
OpenJDK 64-Bit Server VM (build 19.0.1+10, mixed mode)

运行环境为ArchLinux 6.0.10-arch2-1 这是OpenJDK的问题吗?

night-raise commented 1 year ago

试试 socket5://192.168.254.254:1888 呢?

KCCat commented 1 year ago

@night-raise

socket:// 这个不是配置文件里指定的

配置文件里的配置项是这样的

"PROXY_SOCKET_HOST": "192.168.254.254",
"PROXY_PORT": 1888