-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Closed
Labels
Description
shadowsocks-libev/src/plugin.c
Lines 114 to 121 in 870f9d9
extern int fast_open; | |
if (fast_open) | |
cork_exec_add_param(exec, "--fast-open"); | |
#ifdef __ANDROID__ | |
extern int vpn; | |
if (vpn) | |
cork_exec_add_param(exec, "-V"); | |
#endif |
I found this when I develop a new plugin. Then the plugin must could handle this undocumented flag. I think this is not a good approach. Many arguments parse libraries would reject unknown flag.
2020-04-16 17:20:08 INFO: plugin "plugins/h2tun" enabled
2020-04-16 17:20:08 INFO: using tcp fast open
2020-04-16 17:20:08 INFO: initializing ciphers... chacha20-ietf-poly1305
2020-04-16 17:20:08 INFO: listening at 127.0.0.1:1086
2020-04-16 17:20:08 INFO: tcp port reuse enabled
Error: unknown flag: --fast-open
Usage:
h2tun [flags]
Flags:
-h, --help help for h2tun
--local-host string (default "127.0.0.1")
--local-port uint16 (default 18086)
-p, --path string Handle tunnel at the path (default "/h2tunnel")
--remote-host string (default "127.0.0.1")
--remote-port uint16 (default 18096)
-s, --server Run in server mode
-v, --version version for h2tun