Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass undocumented argument '--fast-open' when execute sip003 plugin #2687

Closed
qiuyuzhou opened this issue Apr 16, 2020 · 0 comments
Closed

Pass undocumented argument '--fast-open' when execute sip003 plugin #2687

qiuyuzhou opened this issue Apr 16, 2020 · 0 comments
Labels

Comments

@qiuyuzhou
Copy link

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
@madeye madeye closed this as completed in 33a1932 Apr 17, 2020
@madeye madeye added the bug label Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants