Skip to content

About

白月光VPN转服务器代理,无需root权限

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

服务器无ROOT配置VPN

仅供学习使用

流程

$ unzip v2ray-linux-64.zip -d ~/v2ray
  • 访问订阅链接获得base64编码的ss,类似于下图
  • 复制这一长串base64转化为ss
$ echo 'BASE64_ENCODED_STRING' | base64 -d > ./subscription.txt
  • 运行ss2v2ray.py转化为config
$ python ss2v2ray.py
  • 创建一个启动脚本 start_v2ray.sh
$ echo -e '#!/bin/sh\n~/v2ray/v2ray -config ~/v2ray/config.json' > ~/start_v2ray.sh
$ chmod +x ~/start_v2ray.sh
  • 在你的应用程序或系统中设置代理,指向 V2Ray 的监听端口(默认是 1080),添加到~/.bashrc中
export ALL_PROXY="socks5://127.0.0.1:1080" # socks5协议
export HTTP_PROXY="http://127.0.0.1:8888" # http协议
export HTTPS_PROXY="http://127.0.0.1:8888" # http协议
  • 单独配置git
$ git config --global http.proxy socks5://127.0.0.1:1080
$ git config --global https.proxy socks5://127.0.0.1:1080
# 取消配置
$ git config --global --unset http.proxy 
$ git config --global --unset https.proxy
  • 单独配置pip, 下面的命令需要你在配置bashrc之前
$ pip install -U 'requests[socks]'

使用

$ ~/start_v2ray.sh

成功开启v2ray脚本如下图所示 另开一个终端,输入下面指令,成功访问谷歌

$ curl -x socks5://127.0.0.1:1080 -I http://www.google.com

About

白月光VPN转服务器代理,无需root权限

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages