Post

VPN解除特定域名代理

VPN解除特定域名代理

前言

由于电脑本身处于非限制区域IP,可以直接使用Chatgpt,但当开了OpenVPN到香港后,由于Chatgpt的IP限制,反而不是能使用Chatgpt了,所以使用deepseek的时间更多了,之前跟人吐槽了这个事,他们顺口说了句增加个配置就能解决这个问题。既然有方法能解决这个问题,于是就研究了下,终于搞定了这个事

1、使用命令行查找到Chatgpt使用的ip

1
nslookup chatgpt.com

结果如下:

nslookup chatgpt.com Server: 8.8.8.8 Address: 8.8.8.8#53

Non-authoritative answer: Name: chatgpt.com Address: 104.18.32.47 Name: chatgpt.com Address: 172.64.155.209

2、修改OpenVPN的配置文件,xxx.ovpn

2、找到OpenVPN的配置文件,xxx.ovpn,这本质上是一个txt文件,使用能打开txt的编辑软件打开, 在之前的route规则下,如果之前没有就在verb3下面增加找到的iproute 104.18.32.47 255.255.255.255 net_gateway,打开后的效果如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
client
dev tun
proto udp
remote vpn.example.com 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client.crt
key client.key
remote-cert-tls server
cipher AES-256-CBC
verb 3

# 针对chatgpt添加的路由规则
route 104.18.32.47 255.255.255.255 net_gateway
route 172.64.155.209 255.255.255.255 net_gateway
<ca>
-----BEGIN CERTIFICATE-----
xxxx
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
xxxx
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
xxxx
-----END PRIVATE KEY-----
</key>
<tls-crypt>
-----BEGIN OpenVPN Static key V1-----
xxxx
-----END OpenVPN Static key V1-----
</tls-crypt>

3、OpenVPN重新导入配置文件

重新导入修改过后的xxx.ovpn文件,开启VPN也可以正常使用chatgpt

This post is licensed under CC BY 4.0 by the author.