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

[error]run vscode-server via local ssh socks5 proxy #8035

Open
hermanzhaozzzz opened this issue Feb 13, 2023 · 5 comments
Open

[error]run vscode-server via local ssh socks5 proxy #8035

hermanzhaozzzz opened this issue Feb 13, 2023 · 5 comments
Assignees
Labels
feature-request Request for new features or functionality ssh Issue in vscode-remote SSH tunnels
Milestone

Comments

@hermanzhaozzzz
Copy link

hermanzhaozzzz commented Feb 13, 2023

Hi, I have the need to run a no-internet server as my vscode-server (that is in the slurm system). I used ssh proxy for using https.

export https_proxy="socks5://127.0.0.1:7070"; 
export HTTPS_PROXY="socks5://127.0.0.1:7070"; 
export all_proxy="socks5://127.0.0.1:7070"; 

But I found this error

(base) ➜  bin vscode-server          
[2023-02-13 17:03:49] error failed to lookup tunnel: connection error: error sending request for url (https://asse.rel.tunnels.api.visualstudio.com/api/v1/tunnels/p25x84vd?includePorts=true&tokenScopes=host): error trying to connect: tcp connect error: Network unreachable (os error 101)

I can use this vscode-server cmd in a server which can access the internet.

(base) ➜  ~ vscode-server

Open this link in your browser https://insiders.vscode.dev/+ms-vscode.remote-server/......

Some useful informations

(base) ➜  bin proxy.on
(base) ➜  bin curl www.baidu.com
<html><script>window.location.href="https://its.pku.edu.cn/?cause=unauthN&gowhere="+encodeURIComponent(window.location.href)</script></html>%                                                                                   
(base) ➜  bin proxy.off
(base) ➜  bin curl www.baidu.com
curl: (7) Couldn't connect to server


(base) ➜  bin which proxy.on
proxy.on: aliased to export https_proxy="socks5://127.0.0.1:7070"; export HTTPS_PROXY="socks5://127.0.0.1:7070"; export all_proxy="socks5://127.0.0.1:7070"; git config --global http.proxy "socks5://127.0.0.1:7070"; git config --global https.proxy "socks5://127.0.0.1:7070"


(base) ➜  bin which proxy.off
proxy.off: aliased to export https_proxy=""; export HTTPS_PROXY=""; export all_proxy="";git config --global --unset http.proxy; git config --global --unset https.proxy
@github-actions github-actions bot added the ssh Issue in vscode-remote SSH label Feb 13, 2023
@eleanorjboyd eleanorjboyd self-assigned this Feb 13, 2023
@eleanorjboyd
Copy link
Member

@connor4312, assigning this to you since it seems in your domain but lmk if that is incorrect and I'll investigate from there. Thanks

@connor4312
Copy link
Member

Fyi code-server has been replaced by Remote Tunnels which is accessible on the 'standalone CLI' via code tunnel. I did some work, to support HTTP(S) proxies via that environment variable in this month's release. However, it does not support SOCKS proxies yet. I will keep this feature open as a request to support that.

@connor4312 connor4312 modified the milestones: feat, Backlog Feb 14, 2023
@connor4312 connor4312 added the feature-request Request for new features or functionality label Feb 14, 2023
@hermanzhaozzzz
Copy link
Author

hermanzhaozzzz commented Feb 14, 2023 via email

@carstenbauer
Copy link

@connor4312 Any updates on supporting SOCKS proxies? I'd need this feature as well.

@3f6a
Copy link

3f6a commented Dec 20, 2024

Hi, I would also need to have vscode-server runing on a cluster which can only access the internet through a SOCKS proxy. Any updates on supporting that scenario? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality ssh Issue in vscode-remote SSH tunnels
Projects
None yet
Development

No branches or pull requests

5 participants