Featured image of post 使用 Foxy Proxy 插件实现优雅的浏览器网页流量代理

使用 Foxy Proxy 插件实现优雅的浏览器网页流量代理

问题

为了保持对 GPT Gemini 等的访问,电脑开着系统代理,导致影响对国内网站的访问(速度)的问题,个别情况甚至会因 IP 异常导致封号。

解决

  • 使用 Foxy Proxy 插件 来管理浏览器的代理设置,实现对不同网站的流量进行智能分流。

1. 配置电脑系统代理-以 Win11+Clash Verge 为例

在 Clash 中导入订阅后,进入 设置-Clash 设置-端口设置,将代理端口设置好(默认为 7897),并确保 允许局域网连接 已开启。

clash

2. 配置 Foxy Proxy 插件

  1. 在 Chrome 浏览器中安装 Foxy Proxy 插件 插件。
  2. 点击浏览器右上角的 Foxy Proxy 图标,选择 Options 进入设置页面。
  3. 进入 Proxies 页面,点击 Add 添加一个新的代理配置,填写以下信息(切记点击 Save 保存):
    • Title: Clash Verge
    • Type: SOCKS5
    • Hostname: 127.0.0.1
    • Port: 7897

foxy_proxy

3. 配置规则

  1. 在 Foxy Proxy 刚刚添加的 Clash Verge 代理配置下,点击 Proxy by Patterns 左边的 “+” 号添加新的规则。
  2. 首先配置 All 规则,允许所有流量走系统代理(即 Clash Verge),规则如下:
    • include
    • Wildcard
    • Title: All
    • Pattern: *
  3. 接着配置国内网站规则,允许国内网站直接访问,规则如下:
    • exclude
    • Wildcard
    • Title: Baidu
    • Pattern: *.baidu.com

foxy_proxy_2

注意,特定网站的流量并不止访问域名,还可能涉及到其他域名(如 CDN、API 等),因此需要根据实际情况添加更多的规则来覆盖这些相关域名。 可以通过 F12 开发者工具中的 NetworkSource-Page 面板来查看访问的域名,并将这些域名添加到 Foxy Proxy 的规则中。

baidu

  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
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
// 一个过滤规则
[
  {
    "include": "include",
    "type": "wildcard",
    "title": "All (兜底规则)",
    "pattern": "*",
    "active": true
  },
  {
    "include": "exclude",
    "type": "regex",
    "title": "Intranet 10.x.x.x",
    "pattern": "^(http|ws)s?://10(\\.\\d+){3}(:\\d+)?(/.*)?$",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "Schools",
    "pattern": "*.nwpu.edu.cn",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "Schools",
    "pattern": "*.cuc.edu.cn",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "DeepSeek",
    "pattern": "*.deepseek.com",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "Baidu Subdomains",
    "pattern": "*.baidu.com",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "Baidu Root",
    "pattern": "baidu.com",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "Baidu CDN",
    "pattern": "*.bdimg.com",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "Baidu CDN",
    "pattern": "*.bdstatic.com",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "Bilibili Subdomains",
    "pattern": "*.bilibili.com",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "Bilibili Root",
    "pattern": "bilibili.com",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "Bilibili CDN",
    "pattern": "*.hdslb.com",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "Bilibili Video CDN",
    "pattern": "*.bilivideo.com",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "Bilibili CDN",
    "pattern": "*.szbdyd.com",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "Netease Subdomains",
    "pattern": "*.163.com",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "Netease Root",
    "pattern": "163.com",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "Netease CDN",
    "pattern": "*.127.net",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "Netease Cloud",
    "pattern": "*.163yun.com",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "Zhihu Subdomains",
    "pattern": "*.zhihu.com",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "Zhihu Root",
    "pattern": "zhihu.com",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "Zhihu CDN",
    "pattern": "*.zhimg.com",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "CSDN Subdomains",
    "pattern": "*.csdn.net",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "CSDN Root",
    "pattern": "csdn.net",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "CSDN CDN",
    "pattern": "*.csdnimg.cn",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "Douyin Subdomains",
    "pattern": "*.douyin.com",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "Douyin Root",
    "pattern": "douyin.com",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "Douyin/ByteDance API",
    "pattern": "*.snssdk.com",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "Douyin CDN (Image/Static)",
    "pattern": "*.byteimg.com",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "Douyin CDN (Image/Static)",
    "pattern": "*.pstatp.com",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "Douyin CDN (Video)",
    "pattern": "*.douyinvod.com",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "Douyin CDN (Pic)",
    "pattern": "*.douyinpic.com",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "Xiaohongshu Subdomains",
    "pattern": "*.xiaohongshu.com",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "Xiaohongshu Root",
    "pattern": "xiaohongshu.com",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "Xiaohongshu CDN (Image/Static)",
    "pattern": "*.xhscdn.com",
    "active": true
  },
  {
    "include": "exclude",
    "type": "wildcard",
    "title": "Xiaohongshu CDN (Video)",
    "pattern": "*.xhbvd.com",
    "active": true
  }
]

使用与快捷键

  1. 完成全部配置后,可以通过浏览器右上角的 Foxy Proxy 图标来切换不同的代理配置。
  2. 注意,配置了 Proxy by Patterns 规则后,要切换到 Proxy by Patterns 配置,才能让规则生效。

extension

  1. 可以在 Foxy Proxy 的设置页面中,进入 Options 页面,找到 Keyboard Shortcuts 部分,设置快捷键来快速切换代理配置.

shortcuts

shortcuts

链接

潇洒人间一键仙
使用 Hugo 构建
主题 StackJimmy 设计