IrineSistiana/simple-tls

Android apk 填写cca参数后,启动ss节点报错

loyess opened this issue · 5 comments

版本:Android 9

Apk版本:v0.1.1

Server端使用-gen-cert参数生成的证书,Android Client端填写cca参数后,启动ss节点,报错如下:
Screenshot_20200331-134110__01

使用从Let's Encrypt获取合法的证书,Android端不填写cca字段时,无报错,节点连接正常。

@loyess 安卓里这个报错无法提供任何有价值的信息,它只是说后台插件崩了。

试试非安卓插件,加-caa参数会发生什么?

Client配置

{
    "server":"33.33.33.33",
    "server_port":443,
    "local_port":1080,
    "password":"9vNFmgEt2Jfz",
    "timeout":300,
    "user":"nobody",
    "method":"aes-256-gcm",
    "fast_open":false,
    "nameserver":"8.8.8.8",
    "mode":"tcp_only",
    "plugin":"simple-tls",
    "plugin_opts":"n=www.bing.com;cca=LS0tL…xxx...tLS0tLQo="
}

Client运行:./ss-local -c config.json

2020-04-06 13:51:27 INFO: plugin "/root/simple-tls" enabled
2020-04-06 13:51:27 INFO: initializing ciphers... aes-256-gcm
2020-04-06 13:51:27 INFO: listening at 127.0.0.1:1080
2020/04/06 13:51:27 main: simple-tls
2020/04/06 13:51:27 main: simple-tls is running as a sip003 plugin
2020/04/06 13:51:27 main: invalid sip003 SS_PLUGIN_OPTIONS: invalid option string [cca=LS0tL…xxx...tLS0tLQo=]
2020-04-06 13:51:27 ERROR: plugin service exit unexpectedly
2020-04-06 13:51:27 INFO: error on terminating the plugin.

Server配置

 {
    "server":"0.0.0.0",
    "server_port":443,
    "password":"9vNFmgEt2Jfz",
    "timeout":300,
    "user":"nobody",
    "method":"aes-256-gcm",
    "fast_open":false,
    "nameserver":"8.8.8.8", 
    "mode":"tcp_only",
    "plugin":"simple-tls"
    "plugin_opts":"s;key=/root/www.bing.com.key;cert=/root/www.bing.com.cert"
}

Server运行:./ss-server -c config2.json

2020-04-06 13:49:49 INFO: plugin "/root/simple-tls" enabled
2020-04-06 13:49:49 INFO: initializing ciphers... aes-256-gcm
2020-04-06 13:49:49 INFO: using nameserver: 8.8.8.8
2020-04-06 13:49:49 INFO: tcp server listening at 127.0.0.1:48065
2020/04/06 13:49:49 main: simple-tls
2020/04/06 13:49:49 main: simple-tls is running as a sip003 plugin

忘记考虑base64默认会用=补全了。如果末尾有=会被当成插件参数处理。

@loyess 试试这个:

simple-tls-linux-amd64.zip

-gen-cert应该没有=结尾了。

cca时如果原来的参数最后有=,把=都去掉。

ok,这个可以了