Skip to content

Instantly share code, notes, and snippets.

@dreamlu

dreamlu/win-ss

Last active May 15, 2021
Embed
What would you like to do?
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)
@ouzhou

This comment has been minimized.

Copy link

@ouzhou ouzhou commented Mar 19, 2019

good job

@liboLiao

This comment has been minimized.

Copy link

@liboLiao liboLiao commented Mar 24, 2019

怎么设置本地ss端口?这样行吗
image

@eeezae

This comment has been minimized.

Copy link

@eeezae eeezae commented Aug 5, 2019

如果是1903版本的Windows,代理Windows下的Linux子系统的命令行终端,可以用 export all_proxy='http://127.0.0.1:1080来代理,shadowsocks不需要全局代理即可。
P.S.
测试用curl https://www.google.com可能会403,可以用curl cip.cc

@eeezae

This comment has been minimized.

Copy link

@eeezae eeezae commented Aug 5, 2019

怎么设置本地ss端口?这样行吗
image

不需要设置本地端口,默认开1080,直接使用默认选项就好

@sushengbuhuo

This comment has been minimized.

Copy link

@sushengbuhuo sushengbuhuo commented Sep 4, 2019

git bash use export

@mohuilin

This comment has been minimized.

Copy link

@mohuilin mohuilin commented Oct 3, 2019

Good job!

@ShotoZhao

This comment has been minimized.

Copy link

@ShotoZhao ShotoZhao commented Apr 24, 2020

可以,解决了,tks。

@Henry-ZHR

This comment has been minimized.

Copy link

@Henry-ZHR Henry-ZHR commented Jun 26, 2020

PowerShell 的:

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

亲测可用

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Jul 9, 2020

PowerShell 的:

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

亲测可用

it works, thanks

@Dingzhenpiyi

This comment has been minimized.

Copy link

@Dingzhenpiyi Dingzhenpiyi commented Jul 10, 2020

PowerShell 的:

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

亲测可用

Good job!

@Chenilove

This comment has been minimized.

Copy link

@Chenilove Chenilove commented Sep 3, 2020

刚刚发现PowerShell 走的是网络层!正好能被SSR、SS或V2Ray代理,不用手动设置了!至于CMD,那似乎有坑,我设置了代理也没用,在windows上推荐使用PowerShell。
至于Linux和Mac的shell则需要手动设置代理

@zhaopan

This comment has been minimized.

Copy link

@zhaopan zhaopan commented Nov 13, 2020

GitBash

git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global http.proxy 'socks5://127.0.0.1:1080' 
git config --global https.proxy 'socks5://127.0.0.1:1080'
@huweige

This comment has been minimized.

Copy link

@huweige huweige commented Dec 4, 2020

good job

@cnscorpions

This comment has been minimized.

Copy link

@cnscorpions cnscorpions commented Jan 9, 2021

git bash use export

thank you, it works

@cnscorpions

This comment has been minimized.

Copy link

@cnscorpions cnscorpions commented Jan 9, 2021

if you guys use socks instead, just configure as follows:
export http_proxy=socks:***
export https_proxy=socks:**

it works in git bash 😁

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