Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2ray 配置安装归档 #13

Open
colynn opened this issue Jul 17, 2020 · 0 comments
Open

v2ray 配置安装归档 #13

colynn opened this issue Jul 17, 2020 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@colynn
Copy link
Owner

colynn commented Jul 17, 2020

脚本安装

服务端

  1. 下载脚本
$ wget https://install.direct/go.sh

注意: 该脚本仅可以在 Debian 系列或者支持 Systemd 的 Linux 操作系统使用。

  1. 执行脚本安装 V2Ray
$ sudo bash go.sh

注意归档显示的 PORTUUID也可在 /etc/v2ray/config.json内查看。

  1. 启动V2Ray
$ sudo systemctl start v2ray

客户端

在你的 PC (或手机)中,你需要运行 V2Ray 并使用下面的配置:

{
  "inbounds": [{
    "port": 1080,  // SOCKS 代理端口,在浏览器中需配置代理并指向这个端口
    "listen": "127.0.0.1",
    "protocol": "socks",
    "settings": {
      "udp": true
    }
  }],
  "outbounds": [{
    "protocol": "vmess",
    "settings": {
      "vnext": [{
        "address": "server", // 服务器地址,请修改为你自己的服务器 ip 或域名
        "port": 10086,  // 服务器端口
        "users": [{ "id": "b831381d-6324-4d53-ad4f-8cda48b30811" }]
      }]
    }
  },{
    "protocol": "freedom",
    "tag": "direct",
    "settings": {}
  }],
  "routing": {
    "domainStrategy": "IPOnDemand",
    "rules": [{
      "type": "field",
      "ip": ["geoip:private"],
      "outboundTag": "direct"
    }]
  }
}

上述配置唯一要改的地方就是你的服务器 IP,配置中已注明。上述配置会把除了局域网(比如访问路由器)之外的所有流量转发到你的服务器。

最后 配置浏览器

推荐使用 Proxy SwitchyOmega

: 设置时Protocol 选择SocketV5 , ServerPort也就是你的客户端 inbounds内的配置。

Refer to

  1. https://www.v2ray.com/chapter_00/start.html
  2. https://toutyrater.github.io/prep/install.html
@colynn colynn transferred this issue from colynn/blog-comments Aug 7, 2020
@colynn colynn added the documentation Improvements or additions to documentation label Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant