{"id":30208365,"url":"https://github.com/wangmerlyn/vscode-tunnel-manager","last_synced_at":"2025-08-13T17:25:36.810Z","repository":{"id":305922046,"uuid":"1024226600","full_name":"Wangmerlyn/VSCode-Tunnel-Manager","owner":"Wangmerlyn","description":"A python wrapper manager for VSCode tunnel.","archived":false,"fork":false,"pushed_at":"2025-08-10T12:51:29.000Z","size":18,"stargazers_count":2,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-10T14:42:08.335Z","etag":null,"topics":["email","tunnel","vscode","vscode-remote"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Wangmerlyn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-22T11:22:09.000Z","updated_at":"2025-08-10T12:51:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"01d78cf5-3848-41e8-a969-827deaa7e9bf","html_url":"https://github.com/Wangmerlyn/VSCode-Tunnel-Manager","commit_stats":null,"previous_names":["wangmerlyn/vscode-tunnel-manager"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Wangmerlyn/VSCode-Tunnel-Manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wangmerlyn%2FVSCode-Tunnel-Manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wangmerlyn%2FVSCode-Tunnel-Manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wangmerlyn%2FVSCode-Tunnel-Manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wangmerlyn%2FVSCode-Tunnel-Manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Wangmerlyn","download_url":"https://codeload.github.com/Wangmerlyn/VSCode-Tunnel-Manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wangmerlyn%2FVSCode-Tunnel-Manager/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270278807,"owners_count":24557209,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-13T02:00:09.904Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["email","tunnel","vscode","vscode-remote"],"created_at":"2025-08-13T17:25:34.733Z","updated_at":"2025-08-13T17:25:36.779Z","avatar_url":"https://github.com/Wangmerlyn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VSCode-Tunnel-Manager\n\nA Python CLI wrapper for managing [VS Code tunnel](https://code.visualstudio.com/docs/remote/vscode-server#_connect-using-visual-studio-code-tunnel).\n\n## Overview\n\n`vscode tunnel` is a feature that allows users to connect to a remote server **without SSH or VPN** access. Instead, it authenticates using a GitHub or Microsoft account by way of the **Visual Studio Code CLI** (`code tunnel`). This makes it especially convenient for users who need to access internal servers from external networks.\n\nHowever, the official CLI currently only supports **interactive device code authentication**, which requires manual input during login. This poses a problem for users who **do not have direct access** to the server's terminal (for example, outside the internal network).\n\n## What This Tool Does\n\n**VSCode-Tunnel-Manager** is a lightweight CLI utility that:\n\n- Automatically downloads and installs the VS Code CLI (if missing)\n- Automatically initiates the `code tunnel` login process\n- Captures the **device code prompt** and **sends it by way of email** to a pre-configured recipient\n- Makes it much easier to perform remote login from outside the server\n\nThis enables convenient \"offline\" or indirect authentication to VS Code tunnels.\n\n## Usage Example\n\n### 1. Create an email app password\n\nTake Gmail for example.\n\n**Step 1 — Enable 2-Step Verification**\n1. Go to Google Account Security.\n2. Under “Signing in to Google”, enable **2-Step Verification**.\n3. Complete the verification setup (phone, authenticator app, etc.).\n\n**Step 2 — Create an App Password**\n1. After enabling 2-Step Verification, go back to the **Security** page.\n2. Find **“App passwords”** (it only appears if 2-Step Verification is enabled).\n3. Sign in again if prompted.\n4. Under **“Select app”**, choose:\n   - Mail\n5. Under **“Select device”**, choose:\n   - The device you’re running Python on (or “Other” → give it a name like `PythonScript`).\n6. Click **Generate**.\n7. Copy the **16-character App Password**.\n\n---\n\n### 2. Use the email app password to login and send emails\n\n```bash\npip install git+https://github.com/Wangmerlyn/VSCode-Tunnel-Manager.git@main\n\nexport SMTP_PASSWORD=\"Your App Password\"\n\nvscode_tunnel_manager \\\n  --host smtp.gmail.com \\\n  --port 587 \\\n  --username your-sender-address@gmail.com \\\n  --from-addr your-sender-address@gmail.com \\\n  --to-addrs your-receiver-address@gmail.com \\\n  --subject-prefix \"[VS Code Tunnel] \" \\\n  --starttls \\\n  --working-dir tmp/code_working \\\n  --tunnel-name \"code_tunnel\"\n```\n\n## Why Not Use Token Login?\n\nAlthough the CLI documentation mentions the possibility of authenticating using a **credential token**, this feature is **not yet fully supported** in the current release of `code tunnel`. Until then, this CLI app provides a practical workaround for enabling remote tunnel login.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwangmerlyn%2Fvscode-tunnel-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwangmerlyn%2Fvscode-tunnel-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwangmerlyn%2Fvscode-tunnel-manager/lists"}