====== 科学上网 ====== 本人探索了三种翻墙的方式,前两种是尝试自己搭建翻墙的服务器,第三种是使用免费的翻墙工具。我没有使用市面上常用的 ExpressVPN、Nord VPN、鲨鱼VPN 等大厂的软件。一来,有很多免费的方案,用不着花钱。二来,用自己的服务比较放心,因为我无法确定用别人的东西风险来自在哪里。三来,我比较喜欢折腾,造梯翻墙也是乐趣。 * **方式一**:Open VPN 详细的内容请移步 [[it:server:installomvpi#Open VPN | 树莓派下搭建openvpn服务]] (但是vpn这种翻墙方式在国内已经完全被封锁了,基本没有翻出来的可能。偶尔翻出来一小段时间,马上就会被检测到。) * **方式二**:V2ray 这是目前大家普遍使用,比较可靠的翻墙方式。也是本文章重点介绍的内容。 * **方式三**:FreeDome 使用 V2Ray 仍然有可能翻不出来,实在没辙只好用第三方软件。虽然有点违背我个人的风格,但好歹能解决问题,而且毕竟 FreeDome 是免费的。 * 虽说用VPN翻墙的方式已死,但不代表VPN服务没有用处。它设计的初衷也不是用来翻墙的,而是用来提高数据安全。比如,我有好几个服务器,为了数据安全。ssh都限定了IP访问,只允许局域网内的IP访问服务器上的敏感内容。一旦离开了局域网环境,比如在外旅游的时候,就没有办法直接访问服务器上的内容。这时候,VPN就能发挥它的作用。既然VPN翻不了墙,就让它回到它原来的工作岗位吧。 ===== V2ray 服务器 ===== 项目来源:[[https://www.youtube.com/watch?v=xEewUeWDNeI|解说视频]] / [[https://github.com/bclswl0827/v2ray-heroku|安装脚本(Github)]] 此项目通过 Heroku 提供的免费 VPS 搭建个人的飞机场服务器。(Heroku已经屏蔽了Github上这个项目,需要fork到自己的账户,换一个项目名称,才可以继续使用)。 检测自己的IP地址网站:https://whoer.net/zh 或者 [[http://ipip.net|ipip.net]] 这个项目已经被 Heroku 屏蔽掉。需要fork到自己的账号中,将脚本中所有的地址 ''bclswl0827'' 改为自己的账号名字。 我部署的这个服务器为 ''freilland.herokuapp.com'', ++ UUID | ad806487-2d26-4636-98b6-ab85cc8521f8 ++ 私下向我询问,在v2ray 的添加 VMESS 中输入这个网址就能连通了。\\ 经过cloudflare的域名分发,可以通过 ancient-firefly-a034.goldland.workers.dev 访问。 ===== 客户端配置 ===== 打开 [[https://github.com/2dust/v2rayN/releases|V2ray 客户端 ]] ((a>[[https://tlanyan.pp.ua/v2ray-clients-download/|V2ray客户端下载地址]])) (下载 v2rayN-Core.zip 文件)。解压后运行 v2rayN.exe 文件,然后按照下图演示添加VMESS服务器,端口选443,协议为 ws,底层传输为tls等。 {{:工具:编辑:vmess_setting.png?800|}} 如果配置好以后提示“找不到core”,点击菜单中的“检查更新 -> V2fly-core” 更新一下就好。后面的反代理再说。 {{:工具:编辑:v2ray启动代理.png?400|}} 安卓系统以及ios系统上安装 v2ray 仍然从 ((a)) 中下载客户端,添加服务地址应该与上面大同小异,自行研究一下就好了。 ^ 系统 ^ 地址 ^ | windows | https://github.com/2dust/v2rayN/releases | | 安卓 | https://github.com/2dust/v2rayNG/releases | | iOS | 苹果商店 ((b> 免费v2ray iOS客户端有OneClick、Leaf,付费v2ray iOS客户端有:Shadowrocket、pepi、i2Ray、Kitsunebi和Quantumult。))| 国内访问不了github 的朋友可以移步我的 [[https://pan.baidu.com/s/16qziGwIN2eIqMHmfbrckMA|百度盘]] / ++ 密码 | 9085 ++ 代理成功以后,点击 https://whoer.net/zh 会显示你的IP来自美国。如果仍然无法穿墙,请更换为下面的Cloudflare的反向代理地址:ancient-firefly-a034.goldland.workers.dev 或者干脆使用 freedome 翻墙工具,更为简单,当下时间(2021年8月)为止仍然有效。 ===== Cloudflare 反向代理 ===== 创建一个worker,粘贴以下脚本,部署完以后新的地址为 ''%%ancient-firefly-a034.goldland.workers.dev%%'' addEventListener( "fetch",event => { let url=new URL(event.request.url); url.hostname="freilland.herokuapp.com"; let request=new Request(url,event.request); event. respondWith( fetch(request) ) } ) ====== X-UI 搭建 ====== [[https://luori.xyz/index.php/45/|教程一]] [[https://5best1s.com/%E5%8F%AF%E8%A7%86%E5%8C%96%E7%AE%A1%E7%90%86%E9%9D%A2%E6%9D%BFx-ui/|教程二]] {{fa>angellist}} [[https://github.com/vaxilu/x-ui|Github 项目地址]] ([[https://seakfind.github.io/2021/10/10/X-UI/|Document]]) x-ui 一键安装 bash <(curl -Ls https://raw.githubusercontent.com/vaxilu/x-ui/master/install.sh) (IBM 免费主机需要 [[https://github.com/FranzKafkaYu/x-ui|魔改版]] ''%%bash <(curl -Ls https://raw.githubusercontent.com/FranzKafkaYu/x-ui/master/install.sh)%%'') 注意: - 节点配置必须使用 443 端口 - acme 的证书也不是通用的,使用二级域名要单独申请申请证书。 X-ui 与 nginx 同时使用,需要方向代理。参考 [[https://blog.ixacg.com/282.html|X-ui和宝塔共存,Nginx反代实现,x-ui安装tls]] 例如:ionos 服务器同时运行 wiki.simperator.com 网站,又安装了 x-ui,x-ui的面板地址为 http://217.160.61.19:1121 登录进面板以后,面板url路径改为 ''%%/vpn/%%''。重启以后 http://217.160.61.19:1121/vpn/ 才能正常访问面板。进入 nginx 方向代理。之后就能通过 https://wiki.simperator.com/vpn/ 访问 x-ui 的面板了。此案例的用户名以及密码请看 [[arbeit:kontakt:serversetting#其它服务器|]] // 注意下面 proxy_pass 改的是 http,而不是https location ^~ /vpn/ { proxy_pass http://127.0.0.1:1121/vpn/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } 新增一个节点,端口使用''%%8888%%'',传输协议使用''%%ws%%'',路径改为''%%/trans%%'',并且关闭tls。Nginx 添加一个反向代理 location /trans { proxy_redirect off; proxy_pass http://127.0.0.1:8888; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $http_host; proxy_read_timeout 300s; # Show realip in v2ray access.log proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } 具体参考文章[[https://jamesxwang.com/2021/07/03/v2ray-tls-nginx/|V2ray + TLS + Nginx 反向代理科学上网]] {{:工具:编辑:betterip.jpg?600|}} [[https://www.v2fly.org/config/overview.html|v2ray 使用文档]] 更新分流文件的命令,需要每年执行一次。 wget https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.dat -O /usr/local/x-ui/bin/geosite.dat ++++ 路由设置 | geosite:gfw, geosite:greatfire, geosite:tld-!cn geoip:cloudflare, geoip:cloudfront, geoip:facebook, geoip:fastly, geoip:google, geoip:netflix, geoip:telegram, geoip:twitter ++++ ====== 七合一一键脚本 ====== wget -P /root -N –no-check-certificate "https://raw.githubusercontent.com/mack-a/v2ray-agent/9ae23c13a56460d8c14f27c8eb65efc73b173f46/install.sh" && chmod 700 /root/install.sh && /root/install.sh - cloudflare 的小云朵要灰色 - 证书放在 /etc/v2ray-agent/tls/ali.simperator.top.crt,已有证书的话先保存到这个路径。 ====== CloudFlare 免费翻墙工具 ====== [[it:skills:cf机场|]] [[https://www.ip2world.com/|ip2world]] + 指纹浏览器(HubStudio) 可以实现物理层面的IP环境 [[https://www.kuaidaili.com/free/|免费proxy]] ====== Xray + ipv6 ====== 不良林的这个文档 [[https://www.bulianglin.com/archives/ipv6.html|说明文档]] 演示了如何创建基于ipv6的socks以及vmess代理。 ====== 夏时 Accelerator ====== 需要到淘宝买一个美区 APPLE ID * [[https://apps.apple.com/us/app/vpn-%E5%A4%8F%E6%97%B6-accelerator/id1544742935|夏时 Accelerator]] * [[https://play.google.com/store/apps/details?id=com.free.vpn.super.hotspot.open&hl=de&gl=US|VPN - Super Unlimited Proxy]] * [[https://hyperbeam.com/?c=zhY9a5nF|在线翻墙]] * [[https://www.onworks.net/zh-CN/|在线虚拟机]] * [[https://www.bxvv1.xyz|暴雪VPN]] 使用 ++ 推荐码 | 6993538623343247360 ++ 可免费长期使用 {{tag>vpn}}