jljiu commited on
Commit
2e8ec84
·
verified ·
1 Parent(s): aba202a

Update proxy/main.ts

Browse files
Files changed (1) hide show
  1. proxy/main.ts +11 -2
proxy/main.ts CHANGED
@@ -187,24 +187,33 @@ async function handleConnection(conn: Deno.Conn) {
187
  // 生成Clash配置
188
  function generateClashConfig(spaceDomain: string) {
189
  return `
 
 
190
  mixed-port: 7890
191
  allow-lan: true
192
  mode: Rule
193
  log-level: info
 
 
194
  proxies:
195
  - name: "HFProxy"
196
  type: socks5
197
  server: ${spaceDomain}
198
  port: ${CONFIG.port}
199
  skip-cert-verify: true
200
- timeout: 5000
201
  proxy-groups:
202
  - name: "PROXY"
203
  type: select
204
  proxies:
205
  - HFProxy
 
 
206
  rules:
207
- - MATCH,PROXY
 
 
 
208
  `;
209
  }
210
 
 
187
  // 生成Clash配置
188
  function generateClashConfig(spaceDomain: string) {
189
  return `
190
+ port: 7890
191
+ socks-port: 7891
192
  mixed-port: 7890
193
  allow-lan: true
194
  mode: Rule
195
  log-level: info
196
+ external-controller: 127.0.0.1:9090
197
+
198
  proxies:
199
  - name: "HFProxy"
200
  type: socks5
201
  server: ${spaceDomain}
202
  port: ${CONFIG.port}
203
  skip-cert-verify: true
204
+
205
  proxy-groups:
206
  - name: "PROXY"
207
  type: select
208
  proxies:
209
  - HFProxy
210
+ - DIRECT
211
+
212
  rules:
213
+ - DOMAIN-SUFFIX,google.com,PROXY
214
+ - DOMAIN-SUFFIX,github.com,PROXY
215
+ - DOMAIN-SUFFIX,githubusercontent.com,PROXY
216
+ - MATCH,DIRECT
217
  `;
218
  }
219