版本47和109间的区别 (跳过第62版)
于2020-03-29 21:35:56修订的的版本47
大小: 5717
编辑: czk
备注:
于2023-04-03 07:31:27修订的的版本109
大小: 0
编辑: czk
备注:
删除的内容标记成这样。 加入的内容标记成这样。
行号 1: 行号 1:
= 科学上网 =

<<TableOfContents>>

== 第三方服务 ==

=== Tor ===

Tor洋葱路由,主要用于匿名上网,也能科学上网,安全性很好,只是在国内使用速度比较慢,而且在国内使用可能需要配置Bridge才能连上Tor。

 * 推荐使用Tor Browser,集成了Tor、NoScript等插件的修改版Firefox https://www.torproject.org/download/
 * Tor Bridge https://bridges.torproject.org/
 * 可用的方式 https://medium.com/@phoebecross/using-tor-in-china-1b84349925da

=== CloudFlare VPN ===

CloudFlare公司提供的手机端VPN,使用非常简单,点击如下链接下载手机app即可。

 * https://warp.plus/TTVCb

底层是基于Wireguard,基于UDP容易被QOS,没有桌面客户端,速度也不快。所以还是推荐自建服务。

=== 第三方机场和VPN ===
基于V2ray和Shadowsocks的机场非常多,安全性稳定性未知,不推荐使用。

第三方VPN也非常多,钓鱼的也很多,风险高,也不推荐使用。


== 自建服务 ==

=== 区域和线路选择 ===

区域上,速度 香港 > 台湾 > 日本、韩国 > 新加坡 > 美西 > 其它

线路上,速度 CN2 GIA > CN2 GT > 其它 (听说PCCW也不错,但是没用过)

一分钱一分货,价格一般和速度、流量成正比

=== 供应商 ===

 * AWS 有免费试用
 * GCP 有免费试用
 * [[https://bandwagonhost.com/aff.php?aff=33514|Bandwagon]] 它的CN2-GIA-ECOMMERCE线路非常稳定和快速
 * [[https://pacificrack.com/portal/aff.php?aff=1701|PacificRack]] 价格非常便宜
 * [[https://www.linode.com/?r=6f747b02e162403d05a2347fe4eb0aeed0272253|Linode]] 非常稳定的服务,价格适中
 * [[https://www.vultr.com/?ref=8398227-6G|Vultr]] 新用户赠送100刀,非常有名,但被封的IP也特别多

=== 推荐方案 V2ray ===

V2ray将流量伪装成HTTPS流量,当前比较隐蔽的方式,客户端的选择也非常多。V2ray支持多种协议和配置方式,推荐的是Nginx+TLS+WebSocket+V2ray。

 * 服务端安装教程: https://www.v2ray.com/chapter_00/install.html
 * 服务端配置方法: https://toutyrater.github.io/advanced/wss_and_web.html
 * 服务端开启BBR加速一键脚本: https://github.com/cx9208/Linux-NetSpeed
 * 在服务器前加CDN(可选,如果服务器丢包高或者IP被封时可以用): https://www.cloudflare.com/cdn/
 * 客户端: https://www.v2ray.com/awesome/tools.html
 * OpenWRT路由器科学上网: https://github.com/kuoruan/luci-app-v2ray

=== 推荐方案 Wireguard ===

Wireguard是现在Linux上主推的新VPN方案,取代古老的OpenVPN等方案。但因为底层是UDP,容易被运营商QoS,不过有如下应对QoS的办法。

 * 服务端与客户端安装配置教程: https://10101.io/2018/11/10/wireguard
 * 可选:遇到运营商QoS断流的情况,可以加上udp2raw来伪装成tcp协议 https://github.com/wangyu-/udp2raw-tunnel/blob/master/doc/README.zh-cn.md
 * 可选:遇到丢包严重的情况,可以加上udpspeeder进行FEC纠错编码,但是会多浪费流量 https://github.com/wangyu-/UDPspeeder/blob/branch_libev/doc/README.zh-cn.md

注意:需要在服务端和客户端同时加上或者去掉udp2raw和udpspeeder。由于客户端配置复杂,所以只推荐在路由器上使用。

 * 路由器上wireguard安装配置: https://steemit.com/cn/@curl/openwrt-lede-wireguard-vpn
 * 路由器上区分国内外IP的智能路由配置: https://blog.chih.me/global-proxy-within-ipset-and-iptables.html
 * 路由器上区分国内外域名: https://github.com/felixonmars/dnsmasq-china-list
 * 路由器上配置无污染的dns:
   * https://openwrt.org/docs/guide-user/services/dns/doh_dnsmasq_https-dns-proxy
   * 或者 https://nextdns.io/ https://github.com/nextdns/nextdns/wiki/OpenWRT
   * 或者 https://openwrt.org/docs/guide-user/services/dns/dot_dnsmasq_stubby

=== Telegram代理 ===

此方法只用于连接[[Telegram]]

 * python实现: https://github.com/alexbers/mtprotoproxy
 * 使用haproxy实现与nginx等web服务器共享443端口: https://github.com/alexbers/mtprotoproxy/pull/119

=== 备用方案 Zerotier ===

Zerotier是一个虚拟局域网的软件,支持点对点直接连接,使用非常简便。国外服务器和国内上网主机在同一个局域网内,需要科学上网也就很容易了。缺点也是因为底层是UDP,容易被QoS限流或者断流。

 * 所有主机上安装 https://www.zerotier.com/
 * 方法1: 在国外服务器上安装代理软件,国内主机浏览器使用此代理上网
 * 方法2: 在zerotier配置网页上配置全局路由经过国外主机,在国外主机上开启路由(NAT和ip forward),在国内主机上的zerotier中开启全局路由

=== 备用方案 ShadowSocks ===

Shadowsocks大家都已经很了解,使用很广泛了,这里就不多介绍了。不推荐的原因主要是可能被识别,容易导致服务器被墙等。

== 测试 ==

 * 测试智能路由: http://ip111.cn
 * 测试性能: https://www.speedtest.net/
 * 测试性能: youtube,开启详细统计信息

== 参考 ==

 * 域名劫持攻击事件 https://blog.netlab.360.com/ongoing-websites-hijacking/
 * https://github.com/haoel/haoel.github.io
 * wstunnel https://kirill888.github.io/notes/wireguard-via-websocket/
 * 赛风 https://www.rfa.org/mandarin/about/help/saifeng-09182015141029.html
 * lantern https://github.com/getlantern/download
 * [[https://www.solidot.org/story?sid=30380|DNS污染的附带损害]]
 * https://github.com/ashi009/bestroutetb
 * https://github.com/fivesheep/chnroutes
ch3n2k.com | Copyright (c) 2004-2020 czk.