Skip to content

Instantly share code, notes, and snippets.

@dreamlu
Last active May 15, 2024 12:39
Show Gist options
  • Save dreamlu/cf7cbc0b8329ac145fa44342d6a1c01d to your computer and use it in GitHub Desktop.
Save dreamlu/cf7cbc0b8329ac145fa44342d6a1c01d to your computer and use it in GitHub Desktop.
windows终端翻墙,简易方式
环境:shadowsocks、windows
本地ss端口设置(这里1080)
cmd命令行:(不用socks5)(临时设置)(也可放置环境变量)
set http_proxy=http://127.0.0.1:1080
set https_proxy=http://127.0.0.1:1080
ps:一定要用cmd命令行,千万别用powershell !!!
简易测试命令:curl https://www.google.com(别用ping)
@Zhu-Ying-Jie
Copy link

PowerShell 的:

$env:http_proxy="http://127.0.0.1:1080"
$env:https_proxy="http://127.0.0.1:1080"

亲测可用

thx, it's work

@Rainlt
Copy link

Rainlt commented Dec 6, 2023

PowerShell 的:

$env:http_proxy="http://127.0.0.1:1080"
$env:https_proxy="http://127.0.0.1:1080"

亲测可用

very good!

@viktor-yang
Copy link

如果你设置代理后遇到类似错误

VPN cause "ValueError: When localhost is not accessible, a shareable link must be created. Please set share=True.
你可以设置

set no_proxy=localhost, 127.0.0.1, ::1

参考:AUTOMATIC1111/stable-diffusion-webui#9089

@piczi
Copy link

piczi commented Jan 12, 2024

PowerShell 的:

$env:http_proxy="http://127.0.0.1:1080"
$env:https_proxy="http://127.0.0.1:1080"

亲测可用

it works, thank you!

@Colorfu1
Copy link

PowerShell 的:

$env:http_proxy="http://127.0.0.1:1080"
$env:https_proxy="http://127.0.0.1:1080"

亲测可用

记得要把端口换成自己代理设置的端口,可能每个人代理用的端口不一样,需要自己看一下。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment