超级技巧:把局部代理变成全局VPN

我们有时会遇到需要全局VPN的情况,比如开CMD窗口:需要做GOAPP部署的时候,或者git clone 某些被GFW墙掉的网址时,必须要全局VPN,否则网址无法访问,CMD默认是直连的,不走代理,就算用set 设置了http/https proxy,也没用。

这时候怎么办,要么用VPN Gate,要么买VPN(别便宜了这些卖VPN的)

proxycap可以帮助你解决这问题,proxycap比proxifier更好用,不太占系统资源。

具体方法: 下载proxycap,然后新建一个proxyserver:127.0.0.1:1080(SS代理端口)。
然后新建规则: a. SS走直连 b.其他所有程序redirect throught proxy走代理。

这样就把局部代理变成了全局代理,相当于全局VPN,

下面是测试效果(未开VPN就能部署成功)

E:\GAEGoDeploy>goapp deploy
08:33 AM Application: ABC; version: 1
08:33 AM Host: appengine.google.com
****************************************************************
There is a new release of the SDK available.
-----------
Latest SDK:
api_versions: ['1']
release: 1.9.24
supported_api_versions:
go:
api_versions: [go1]
java7:
api_versions: ['1.0']
python:
api_versions: ['1']
python27:
api_versions: ['1']
timestamp: 1434758070

-----------
Your SDK:
api_versions: ['1']
release: 1.9.22
supported_api_versions:
go:
api_versions: [go1]
java7:
api_versions: ['1.0']
python:
api_versions: ['1']
python27:
api_versions: ['1']
timestamp: 1431461849

-----------
Please visit https://developers.google.com/appengine/downloads
for the latest SDK
****************************************************************
08:33 AM
Starting update of app: ABC, version: 1
08:33 AM Getting current resource limits.
Your browser has been opened to visit:

https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis
.com%2Fauth%2Fappengine.admin+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-pl
atform&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2F&response_type=code&client_i
d=550516889912.apps.googleusercontent.com&access_type=offline

If your browser is on a different machine then exit and re-run this
application with the command-line parameter

--noauth_local_webserver

Authentication successful.
08:34 AM Scanning files on local disk.
08:34 AM Cloning 2 application files.
08:34 AM Compilation starting.
08:34 AM Compilation: 1 files left.
08:34 AM Compilation completed.
08:34 AM Starting deployment.
08:34 AM Checking if deployment succeeded.
08:34 AM Deployment successful.
08:34 AM Checking if updated app version is serving.
08:34 AM Completed update of app: ABC, version: 1

来源:https://code.google.com/p/goagent/issues/detail?id=22087

源地址:http://www.atgfw.org/2015/07/vpn.html

没有评论: