<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Soul Of Free Loop &#187; OpenVPN</title>
	<atom:link href="https://zohead.com/archives/tag/openvpn/feed/" rel="self" type="application/rss+xml" />
	<link>https://zohead.com</link>
	<description>Uranus Zhou&#039;s Blog</description>
	<lastBuildDate>Sat, 19 Jul 2025 15:42:46 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.8</generator>
	<item>
		<title>OpenWRT实现OpenVPN按ipset自动分流</title>
		<link>https://zohead.com/archives/openwrt-openvpn-ipset/</link>
		<comments>https://zohead.com/archives/openwrt-openvpn-ipset/#comments</comments>
		<pubDate>Sun, 16 Jul 2017 04:35:35 +0000</pubDate>
		<dc:creator><![CDATA[Uranus Zhou]]></dc:creator>
				<category><![CDATA[网络]]></category>
		<category><![CDATA[dnsmasq]]></category>
		<category><![CDATA[gfwlist]]></category>
		<category><![CDATA[ipset]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[newifi mini]]></category>
		<category><![CDATA[OpenVPN]]></category>
		<category><![CDATA[OpenWRT]]></category>
		<category><![CDATA[PandoraBox]]></category>
		<category><![CDATA[TUN]]></category>
		<category><![CDATA[Windscribe]]></category>

		<guid isPermaLink="false">https://zohead.com/?p=1476</guid>
		<description><![CDATA[接着上面一篇介绍 Windscribe 免费 VPN 的文章，住处的网络通过 OpenVPN 连接 Windscribe 之后虽然速度不快，但好歹广电宽带下没有之前用的几个 VPS 经常超时的问题了。因此想着最好能部署到现在用的 newifi mini 路由器上（毕竟已经刷了 PandoraBox 固件），目标就是能在路由器上用 OpenVPN 连接 Windscribe 并自动分流翻墙访问某些特殊的网站。 OpenWRT 安装使用 OpenVPN 首先在路由器上安装 OpenVPN 客户端： 把上篇文章中生成的 Windscribe OpenVPN 配置文件上传到 /etc/openvpn  [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>接着上面一篇介绍 <a href="https://zohead.com/archives/windscribe-openvpn/">Windscribe 免费 VPN</a> 的文章，住处的网络通过 OpenVPN 连接 Windscribe 之后虽然速度不快，但好歹广电宽带下没有之前用的几个 VPS 经常超时的问题了。因此想着最好能部署到现在用的 newifi mini 路由器上（毕竟已经刷了 PandoraBox 固件），目标就是能在路由器上用 OpenVPN 连接 Windscribe 并自动分流翻墙访问某些特殊的网站。</p>
<h2 id="openwrt-安装使用-openvpn">OpenWRT 安装使用 OpenVPN</h2>
<p>首先在路由器上安装 OpenVPN 客户端：</p>
<pre class="brush: bash; title: ; notranslate">
[root@PandoraBox:/root]# opkg update
[root@PandoraBox:/root]# opkg install openvpn-openssl
</pre>
<p>把上篇文章中生成的 Windscribe OpenVPN 配置文件上传到 <code>/etc/openvpn</code> 目录，假设配置文件路径为 <code>/etc/openvpn/windscribe.ovpn</code>。</p>
<p>这里需要注意 OpenWRT 的 OpenVPN 客户端并不能像 Windows 等客户端那样提示用户输入 Windscribe VPN 连接用户名和密码，只能通过用户密码文件指定。我们需要手工生成用户密码文件 <code>/etc/openvpn/windscribe.txt</code>，文件格式为第一行用户名，第二行密码。</p>
<p>接着修改 OpenVPN 配置文件，增加一行指定用户密码文件：</p>
<pre class="brush: plain; title: ; notranslate">
auth-user-pass windscribe.txt
</pre>
<blockquote>
<p><strong>提示</strong></p>
<p>如果你使用的 OpenVPN 客户端版本比较老（比如我的 PandoraBox 系统里安装的是 2.3.6-2 版本），可能不支持 Windscribe OpenVPN 配置文件里的 <code>block-outside-dns</code> 选项，如果 OpenVPN 运行报错的话可以注释掉这个选项。</p>
</blockquote>
<p>然后修改 <code>/etc/config/openvpn</code> 配置文件增加一个新的 OpenVPN instance，新的配置名称不要与现有的重复即可：</p>
<pre class="brush: plain; title: ; notranslate">
config openvpn 'windscribe'
	option config '/etc/openvpn/windscribe.ovpn'
	option enabled '1'
</pre>
<p>剩下就是激活并启动 OpenVPN 客户端服务了：</p>
<pre class="brush: bash; title: ; notranslate">
[root@PandoraBox:/root]# /etc/init.d/openvpn enable
[root@PandoraBox:/root]# /etc/init.d/openvpn start
</pre>
<p>稍等一会，如果一切正常的话，用 <code>logread</code> 命令应该能看到 OpenVPN 的连接日志：</p>
<pre class="brush: bash; title: ; notranslate">
[root@PandoraBox:/root]# logread -f
Fri Jul  7 00:02:13 2017 daemon.notice openvpn(windscribe)[5618]: TUN/TAP device tun0 opened
Fri Jul  7 00:02:13 2017 daemon.notice openvpn(windscribe)[5618]: do_ifconfig, tt-&gt;ipv6=0, tt-&gt;did_ifconfig_ipv6_setup=0
Fri Jul  7 00:02:13 2017 daemon.notice openvpn(windscribe)[5618]: /sbin/ifconfig tun0 10.110.34.41 netmask 255.255.254.0 mtu 1500 broadcast 10.110.35.255
Fri Jul  7 00:02:13 2017 daemon.notice openvpn(windscribe)[5618]: Initialization Sequence Completed
</pre>
<p>连接上服务器之后可以看看 OpenVPN tun 设备路由信息：</p>
<pre class="brush: bash; title: ; notranslate">
[root@PandoraBox:/root]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.110.34.1     128.0.0.0       UG    0      0        0 tun0
0.0.0.0         10.58.71.1      0.0.0.0         UG    0      0        0 eth0.2
10.58.71.0      0.0.0.0         255.255.255.0   U     0      0        0 eth0.2
10.110.34.0     0.0.0.0         255.255.254.0   U     0      0        0 tun0
103.10.197.3    10.58.71.1      255.255.255.255 UGH   0      0        0 eth0.2
128.0.0.0       10.110.34.1     128.0.0.0       UG    0      0        0 tun0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 br-lan
</pre>
<h2 id="dnsmasq-配置修改">dnsmasq 配置修改</h2>
<p>与之前使用的 Shadowsocks 通过 ipset 自动分流类似，我们首先需要在 OpenWRT 上安装 <code>dnsmasq-full</code> 和 <code>ipset</code> 包。</p>
<p>基本原理也很简单，OpenWRT 上的 dnsmasq 服务器将 gfwlist 中的域名通过 OpenVPN 解析防止域名污染并将解析结果添加到 ipset，然后设置 ipset 中的所有 IP 地址都走 OpenVPN 翻墙，其它地址仍然走默认的宽带线路。</p>
<p>dnsmasq 使用 gfwlist 和 gfwlist 自动更新的方法可以参考我之前写的 <a href="https://zohead.com/archives/newifi-mini-openwrt/">newifi mini路由器OpenWRT初步体验</a> 文章。</p>
<p>我的服务器上基于 gfwlist 自动生成的 dnsmasq 配置文件地址没有变：</p>
<p><a href="https://zohead.com/downloads/dnsmasq.tar.gz">https://zohead.com/downloads/dnsmasq.tar.gz</a></p>
<p>只是自动更新 gfwlist 的 crontab 配置文件要修改一下了，因为上面的 dnsmasq 配置文件是为 Shadowsocks 本地转发解析域名准备的，这里换成 Google 提供的 <code>8.8.8.8</code> DNS 解析服务器：</p>
<pre class="brush: bash; title: ; notranslate">
[root@PandoraBox:/root]#cat /etc/crontabs/root
10 5 * * * curl -k -o /tmp/dnsmasq.tar.gz https://zohead.com/downloads/dnsmasq.tar.gz &amp;&amp; tar -C /tmp -xzf /tmp/dnsmasq.tar.gz &amp;&amp; sed -i 's/127\.0\.0\.1#5353$/8.8.8.8/g' /tmp/dnsmasq_list.conf &amp;&amp; cat /tmp/dnsmasq_list.conf &gt; /etc/dnsmasq.d/dnsmasq_list.conf &amp;&amp; rm -f /tmp/dnsmasq.tar.gz /tmp/dnsmasq_list.conf
</pre>
<h2 id="配置-ipset-自动分流">配置 ipset 自动分流</h2>
<p>首先修改 <code>/etc/iproute2/rt_tables</code> 配置文件，为 OpenVPN 专门增加一个名字为 <code>gfwtable</code> 的路由表（数字不和现有的表重复即可）：</p>
<pre class="brush: plain; title: ; notranslate">
99	gfwtable
</pre>
<p>需要注意的是我们可以从上面的 OpenVPN tun 设备路由信息中看到 OpenVPN 客户端连接上服务器之后自动添加了默认路由，而为了使默认流量都走宽带线路，需要修改 OpenVPN 配置文件禁用默认路由：</p>
<pre class="brush: plain; title: ; notranslate">
route-nopull
</pre>
<p>编辑 <code>/etc/firewall.user</code> 文件增加自定义的防火墙规则：</p>
<pre class="brush: bash; title: ; notranslate">
[root@PandoraBox:/root]# cat /etc/firewall.user
ipset -N gfwlist iphash
iptables -t mangle -N fwmark
iptables -t mangle -C OUTPUT -j fwmark || iptables -t mangle -A OUTPUT -j fwmark
iptables -t mangle -C PREROUTING -j fwmark || iptables -t mangle -A PREROUTING -j fwmark
</pre>
<p>分别简单解释一下：</p>
<ul>
<li>第一行增加新的 iphash 类型的名为 <code>gfwlist</code> 的 ipset；</li>
<li>第二行在 iptables 的 <code>mangle</code> 表中新增 <code>fwmark</code> 链；</li>
<li>第三和第四行分别在 iptables 的 <code>mangle</code> 表的 <code>OUTPUT</code> 和 <code>PREROUTING</code> 链中增加 <code>fwmark</code> target，为了避免重复，增加之前都用了 iptables 命令判断原有规则是否已经存在；</li>
<li>后面三条规则有些 OpenWRT 系统里已经自带了，这里为了保险还是加上了。</li>
</ul>
<p>接着还要再修改 Windscribe OpenVPN 配置文件，增加 VPN 的启动和停止脚本设置，因为我们要在脚本中 添加 / 删除 路由和 iptables 规则：</p>
<pre class="brush: plain; title: ; notranslate">
script-security 2
up /etc/openvpn/openvpn-up.sh
down /etc/openvpn/openvpn-down.sh
</pre>
<p>当然别忘了给 OpenVPN 启动和停止脚本增加执行权限：</p>
<pre class="brush: bash; title: ; notranslate">
[root@PandoraBox:/root]#chmod +x /etc/openvpn/openvpn-up.sh /etc/openvpn/openvpn-down.sh
</pre>
<p>OpenVPN 调用启动和停止脚本的参数格式会区分 tun 和 tap 设备，对于 tun 设备脚本调用参数是这样的：</p>
<pre class="brush: bash; title: ; notranslate">
cmd tun_dev tun_mtu link_mtu ifconfig_local_ip ifconfig_remote_ip [ init | restart ]
</pre>
<p>tap 设备则是：</p>
<pre class="brush: bash; title: ; notranslate">
cmd tap_dev tap_mtu link_mtu ifconfig_local_ip ifconfig_netmask [ init | restart ]
</pre>
<p>这里我们只需要关心第一个 tun /tap 设备名参数，我的 OpenVPN 启动脚本如下：</p>
<pre class="brush: bash; title: ; notranslate">
[root@PandoraBox:/root]#cat /etc/openvpn/openvpn-up.sh
#!/bin/sh
ip route add 8.8.8.8 dev $1
iptables -t mangle -A fwmark -m set --match-set gfwlist dst -j MARK --set-mark 0xffff
ip rule add fwmark 0xffff table gfwtable
ip route add default dev $1 table gfwtable
iptables -I FORWARD -o $1 -j ACCEPT
iptables -t nat -I POSTROUTING -o $1 -j MASQUERADE
</pre>
<p>同样简单说明一下：</p>
<ul>
<li>首先将 <code>8.8.8.8</code> DNS 解析服务器设置为从 OpenVPN 走防止域名污染；</li>
<li>使用 iptables <code>mangle</code> 表中的 <code>fwmark</code> 链为所有目标为 gfwlist ipset 中 IP 地址的数据包打标记，这里标记号用的是 0xffff；</li>
<li>所有标记号为 0xffff 的数据包都使用上面新增的 <code>gfwtable</code> 路由表；</li>
<li><code>gfwtable</code> 路由表固定使用 OpenVPN 线路；</li>
<li>最后两条 iptables 规则也非常重要，允许路由器下的其它设备访问被封锁域名时走 OpenVPN 线路。</li>
</ul>
<p>类似的 OpenVPN 停止脚本就比较简单了：</p>
<pre class="brush: bash; title: ; notranslate">
[root@PandoraBox:/root]#cat /etc/openvpn/openvpn-down.sh
#!/bin/sh
ip rule del table gfwtable
iptables -t mangle -D fwmark -m set --match-set gfwlist dst -j MARK --set-mark 0xffff
iptables -D FORWARD -o $1 -j ACCEPT
iptables -t nat -D POSTROUTING -o $1 -j MASQUERADE
</pre>
<p>都是清理启动脚本中增加的规则，ip route 项会在 tun 设备停止时自动删除，不需要手工进行清理了。</p>
<h2 id="总结">总结</h2>
<p>经过这番对 OpenWRT 的配置折腾，现在住处的手机和电脑就都能通过 Windscribe OpenVPN 自动翻墙了。</p>
<p>最后贴上我的 newifi mini 路由器上的 Windscribe 完整 OpenVPN 配置文件给大家参考，由于文件比较长我放到 Pastebin 上了，最后祝大家炎炎夏日也能玩的开心：</p>
<p><a href="http://pastebin.com/raw.php?i=TWbaMXdg" target="_blank">http://pastebin.com/raw.php?i=TWbaMXdg</a></p>
]]></content:encoded>
			<wfw:commentRss>https://zohead.com/archives/openwrt-openvpn-ipset/feed/</wfw:commentRss>
		<slash:comments>36</slash:comments>
		</item>
		<item>
		<title>使用OpenVPN连接Windscribe免费VPN</title>
		<link>https://zohead.com/archives/windscribe-openvpn/</link>
		<comments>https://zohead.com/archives/windscribe-openvpn/#comments</comments>
		<pubDate>Fri, 07 Jul 2017 16:59:16 +0000</pubDate>
		<dc:creator><![CDATA[Uranus Zhou]]></dc:creator>
				<category><![CDATA[网络]]></category>
		<category><![CDATA[OpenVPN]]></category>
		<category><![CDATA[VPN]]></category>
		<category><![CDATA[Windscribe]]></category>
		<category><![CDATA[广电]]></category>
		<category><![CDATA[翻墙]]></category>

		<guid isPermaLink="false">https://zohead.com/?p=1466</guid>
		<description><![CDATA[前言 最近换了住处之后，我还是没想到平时上网的宽带问题会成为一大痛点：现在住的地方基本上只能办理南京的广电宽带。广电宽带不但有着臭名昭著的速度慢游戏卡以及墙中墙问题，而且由于其 IP 地址资源有限，访问一些网站经常出现 IP 全国各地乱飞的情况，最要命的是其出国线路与我之前用的移动宽带完全没法比。 我观察到的南京广电宽带基本出国都是走联通线路，使用的是内蒙古包头之类的奇葩 IP 地址。之前在住处用于翻墙的 AlphaRacks VPS 和 Arukas 容器搭建的 Shadowsocks 服务器现在基本都处于不可用的状态，Google 搜索勉强能打开，Gmail 经常卡的不要不要的，YouTu [&#8230;]]]></description>
				<content:encoded><![CDATA[<h2 id="前言">前言</h2>
<p>最近换了住处之后，我还是没想到平时上网的宽带问题会成为一大痛点：现在住的地方基本上只能办理南京的广电宽带。广电宽带不但有着臭名昭著的速度慢游戏卡以及墙中墙问题，而且由于其 IP 地址资源有限，访问一些网站经常出现 IP 全国各地乱飞的情况，最要命的是其出国线路与我之前用的移动宽带完全没法比。</p>
<p>我观察到的南京广电宽带基本出国都是走联通线路，使用的是内蒙古包头之类的奇葩 IP 地址。之前在住处用于翻墙的 AlphaRacks VPS 和 Arukas 容器搭建的 Shadowsocks 服务器现在基本都处于不可用的状态，Google 搜索勉强能打开，Gmail 经常卡的不要不要的，YouTube 视频则基本不用想了。</p>
<p>更恶心的是广电宽带还直接屏蔽了 ICMP ping 外网的请求，只能 ping 广电内网的地址，至于普通的 <code>traceroute</code> 路由跟踪就更别想了。</p>
<p>下面贴出来的是我在 Linux 下使用专用的 TCP 路由跟踪 <code>tcptraceroute</code> 命令看到的惨不忍睹的结果，目的地址是移动宽带下用的无比顺畅的日本免费 Arukas 容器：</p>
<pre class="brush: bash; title: ; notranslate">
(trusty)zzm@localhost:~$ tcptraceroute -n 153.125.238.173 31626
Selected device wlan0, address 192.168.1.243, port 50713 for outgoing packets
Tracing the path to 153.125.238.173 on TCP port 31626, 30 hops max
 1  192.168.1.1  1.321 ms  1.567 ms  3.853 ms
 2  10.58.71.1  9.688 ms  14.964 ms  11.497 ms
 3  192.168.104.57  8.138 ms  20.722 ms  9.597 ms
 4  111.208.1.141  10.785 ms  11.364 ms  8.861 ms
 5  111.208.1.190  9.602 ms  10.524 ms  11.136 ms
 6  192.168.3.225  8.822 ms  9.481 ms  8.833 ms
 7  * * *
 8  172.16.116.13  70.035 ms  71.014 ms  68.664 ms
 9  * * *
10  * * *
11  * * *
12  * * *
13  * * *
14  * * *
15  * * *
16  * * *
17  * * *
18  * * *
19  * * *
20  * * *
21  * * *
22  * * *
23  * * *
24  * * *
25  * * *
26  * * *
27  * * *
28  * * *
29  * * *
30  * * *
Destination not reached
</pre>
<p>由于我平常也使用 Chromebook 设备，特别依赖 Google 服务，Gmail 自不必说，经常要用 Google Drive 同步文件，另外也使用 Google Photos 备份照片，这样必须无法忍受需要找其它翻墙方案。</p>
<h2 id="关于-windscribe-vpn">关于 Windscribe VPN</h2>
<p><a href="https://windscribe.com/?friend=uxavdz64">Windscribe</a> 还是从我一个同事那里了解到的免费 VPN 服务，默认提供每个月 10GB 的流量，免费账户也有多国服务器可选，通过代金券可以增加到每月 50GB 或者 60GB。</p>
<p>需要的朋友可以通过下面的链接注册（没错，带了我的推荐小尾巴 ^_^），需要注意 Windscribe 网站必须翻墙才能打开：</p>
<p><a href="https://windscribe.com/?friend=uxavdz64" target="_blank">https://windscribe.com/?friend=uxavdz64</a></p>
<p>Windscribe 的付费账户则是无限流量每月 $7.50 美元起，最近他们在搞 Lobster Lover 优惠活动，现在付费账户限时 3 折促销每年 $29.99 美元，有需要的朋友可以注册之后用 <a href="https://windscribe.com/upgrade?promo=LOBSTER1&amp;pcpid=lobster_july_2017" target="_blank">Lobster Lover</a> 链接优惠升级哦。</p>
<p>账户注册完成之后登录，在 <code>My Account</code> 页面中点击 <code>Claim Voucher</code> 按钮输入代金券代码：</p>
<ul>
<li><code>SOS60GBS</code>，流量增加到每个月 60 GB，暂不确定什么时候过期；</li>
<li><code>50GBFREE</code>，流量增加到每个月 50 GB。</li>
</ul>
<p>Windscribe 提供了 Windows、Mac OS X、iPhone 下的客户端，而且还有官方的 Chrome、Firefox、Opera 浏览器下的 VPN 扩展程序，客户端下载链接在此：</p>
<p><a href="https://chn.windscribe.com/download" target="_blank">https://chn.windscribe.com/download</a></p>
<p>从下载页面可以看到 Linux、Android 客户端都只有收费账户才支持，而且 Windscribe 并没有直接提供 Linux 和 Android 下的官方客户端，而是通过 OpenVPN、IKEv2、SOCKS5 等配置文件的方式让用户使用其它工具来连接 Windscribe VPN 服务器。</p>
<h2 id="openvpn-连接-windscribe">OpenVPN 连接 Windscribe</h2>
<p>如此看来 Windscribe 是直接支持以 OpenVPN 方式来连接的，当然收费账户可以从下面的链接直接下载 OpenVPN 配置文件和证书：</p>
<p><a href="https://chn.windscribe.com/getconfig/openvpn" target="_blank">https://chn.windscribe.com/getconfig/openvpn</a></p>
<p>虽然免费账户无法下载 OpenVPN 配置，但我估计 Windows 等系统下的客户端很有可能还是以 OpenVPN 方式实现的，马上下载安装 Windows 客户端来确认。</p>
<p>客户端安装的时候会自动提示安装 OpenVPN 的 TAP 驱动，完成之后使用 Windscribe 账户登录，默认会选择离我们最近的香港服务器。连接成功之后就能在进程列表看到 Windscribe 的 <code>windscribeopenvpn.exe</code> 程序，而且在命令行参数中还能看到 OpenVPN 配置文件路径：</p>
<pre class="brush: plain; title: ; notranslate">
&quot;C:\Program Files (x86)\Windscribe\windscribeopenvpn.exe&quot; --config &quot;C:/Users/xxx/AppData/Local/Windscribe/Windscribe/config.ovpn&quot; --management 127.0.0.1 57593 --management-query-passwords --management-hold
</pre>
<p>首先从下面的路径把 OpenVPN 配置文件拷贝出来：</p>
<pre class="brush: plain; title: ; notranslate">
C:/Users/xxx/AppData/Local/Windscribe/Windscribe/config.ovpn
</pre>
<p>配置文件内容大概是这样的：</p>
<pre class="brush: plain; title: config.ovpn; notranslate">
client
dev tun

nobind
auth-user-pass
reneg-sec 432000
resolv-retry infinite

auth SHA512
cipher AES-256-CBC
keysize 256
comp-lzo
verb 2
mute-replay-warnings
ns-cert-type server
persist-key
persist-tun

key-direction 1
&lt;ca&gt;
-----BEGIN CERTIFICATE-----
xxxxxx
-----END CERTIFICATE-----
&lt;/ca&gt;
&lt;tls-auth&gt;
-----BEGIN OpenVPN Static key V1-----
xxxxxx
-----END OpenVPN Static key V1-----
&lt;/tls-auth&gt;
block-outside-dns

remote 103.10.197.3
port 443
proto udp
</pre>
<p>中间的 CA 证书和 TLS 认证 key 太长就没有全部贴出来了，<code>remote</code> 明显就是 Windscribe OpenVPN 服务器的地址，这里的 <code>103.10.197.3</code> 就是 Windscribe 的香港服务器。</p>
<p>现在剩下的问题就是 OpenVPN 的登录用户名和密码了，Windscribe 的 <a href="https://chn.windscribe.com/guides/ubuntu" target="_blank">Linux 客户端说明</a> 中明确提醒用户需要注意的就是 OpenVPN 用户名和密码并不是 Windscribe 账户名和密码。</p>
<p>Windscribe 的 Windows 客户端里并没有直接提供用户名和密码，而且 Windscribe 网站上也只有付费账户才能得到，但这并不妨碍我们从 Windscribe 客户端的日志文件中找出端倪。</p>
<p>打开 Windscribe 客户端的日志文件：</p>
<pre class="brush: plain; title: ; notranslate">
C:\Users\xxx\AppData\Local\Windscribe\Windscribe\log.txt
</pre>
<p>不出意外的话你应该能在其中找到类似下面的输出：</p>
<pre class="brush: plain; title: ; notranslate">
[0607 03:18     36.573] [basic]	 state = CONNECT_BUTTON_CONNECTING
[0607 03:18     36.574] [basic]	 radiusUsername:  &quot;nocwat_xxx&quot;
[0607 03:18     36.574] [basic]	 radiusPassword:  &quot;pppppp&quot;
[0607 03:18     36.574] [basic]	 Connecting to &quot;最佳位置&quot;
[0607 03:18     36.574] [connection]	 Use latest successfully connection protocol: &quot;UDP&quot;
[0607 03:18     36.574] [connection]	 Connection settings: automatic
[0607 03:18     36.574] [connection]	 Location nodes: &quot;node1 = {ip1 = 103.10.197.2, ip2 = 103.10.197.3, ip3 = 103.10.197.4}; &quot;
[0607 03:18     36.575] [connection]	 OVPN-config path: &quot;C:/Users/xxx/AppData/Local/Windscribe/Windscribe/config.ovpn&quot;
[0607 03:18     36.575] [connection]	 Connecting to IP: &quot;103.10.197.3&quot;  protocol: &quot;UDP&quot;  port: 443
</pre>
<p>上面日志里的 <code>radiusUsername</code> 和 <code>radiusPassword</code> 就是 Windscribe 的 OpenVPN 服务器登录用户名和密码了。</p>
<p>接着就是打开 OpenVPN 软件使用刚才拷贝出来的 <code>config.ovpn</code> 配置文件，然后用上面的 OpenVPN 用户名和密码登录了，我的免费账户使用这种绕过 Windscribe 官方客户端的方式登录在测试中并没有发现什么问题。</p>
<h2 id="windscribe-服务器列表">Windscribe 服务器列表</h2>
<p>到这里你应该能使用泛用型 OpenVPN 客户端来连接 Windscribe VPN 了，只是 Windscribe 多个地区的 VPN 服务器地址稍微麻烦点，毕竟使用过程中总会遇到某些地区的服务器比较慢需要切换的。</p>
<p>不过还好网上已经有人整理好了 Windscribe 的各地区 VPN 服务器地址了，大家直接从下面的地址下载 UDP 或者 TCP 协议的各地区 OpenVPN 配置文件：</p>
<p><a href="https://github.com/haugene/docker-transmission-openvpn/files/502948/Windscribe-OVPN-UDP.zip" target="_blank">Windscribe-OVPN-UDP.zip</a> <br />
<a href="https://github.com/haugene/docker-transmission-openvpn/files/502949/Windscribe-OVPN-TCP.zip" target="_blank">Windscribe-OVPN-TCP.zip</a></p>
<p>解压缩之后使用其中某个地区的 OpenVPN 配置文件即可，登录时仍然使用前面日志文件中找到的用户名和密码。</p>
<p>当然后面很可能会碰到配置文件中的服务器地址不正确或者 Windscribe 修改了证书之类的情况，不过大家还是可以从 Windscribe 客户端的服务日志中找到正确的服务器地址，例如：</p>
<pre class="brush: plain; title: ; notranslate">
[04-07 12:11:06]	Service started
[04-07 12:15:14]	AA_COMMAND_FIREWALL_CHANGE, AllowLocalTraffic=1, Ips=38.95.108.xxx;xxxxxx;104.18.56.xxx
[04-07 12:15:14]	AA_COMMAND_FIREWALL_IPV6_ENABLE
[04-07 12:15:14]	Error 13
[04-07 12:15:14]	AA_COMMAND_EXECUTE, blocking=0, cmd=&quot;C:\Program Files (x86)\Windscribe\windscribeopenvpn.exe&quot; --config &quot;C:/Users/xxx/AppData/Local/Windscribe/Windscribe/config.ovpn&quot; --management 127.0.0.1 57593 --management-query-passwords --management-hold
</pre>
<p>上面日志输出中的 <code>Ips</code>（并没有全部列出来） 就是客户端获取到的所有 Windscribe VPN 服务器的地址了。</p>
]]></content:encoded>
			<wfw:commentRss>https://zohead.com/archives/windscribe-openvpn/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
