53c4c4671a931d9f7a3b39fe9131c6f84fe27ca5

Author
Ruize Tang <1466040111@qq.com>
Committer
GitHub <noreply@github.com>
Date

Message

fix(shell-proxy): support ssh-proxy using http proxy in cygwin (#12340)

Diff

 1diff --git a/plugins/shell-proxy/ssh-proxy.py b/plugins/shell-proxy/ssh-proxy.py
 2index a498c84bc8c8fc643a65f65df206f698180eb112..4b692f9e405bbfc37db1185c16f7d01cf13f3599 100755
 3--- a/plugins/shell-proxy/ssh-proxy.py
 4+++ b/plugins/shell-proxy/ssh-proxy.py
 5@@ -22,7 +22,8 @@ if parsed.scheme not in proxy_protocols:
 6 
 7 def make_argv():
 8     yield "nc"
 9-    if sys.platform == 'linux':
10+    if sys.platform in {'linux', 'cygwin'}:
11+        # caveats: the built-in netcat of most linux distributions and cygwin support proxy type
12         # caveats: macOS built-in netcat command not supported proxy-type
13         yield "-X" # --proxy-type
14         # Supported protocols are 4 (SOCKS v4), 5 (SOCKS v5) and connect (HTTP proxy).