Skip to content

Commit

Permalink
✨ copilot proxy fuzzy matching
Browse files Browse the repository at this point in the history
  • Loading branch information
v_frgfeng committed Apr 8, 2024
1 parent 8da84df commit fb9ebe3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions api/copilot/copilot.go
Original file line number Diff line number Diff line change
Expand Up @@ -490,9 +490,12 @@ func ClearAuthCount() {

var pacContent string
var pacTpl = `function FindProxyForURL(url, host) {
if (host == 'githubusercontent.com' || host == 'githubcopilot.com' || host == 'cocopilot.net' || host == 'google.com') {
return '%s'
}
if (host.indexOf('githubusercontent.com') != -1 ||
host.indexOf('githubcopilot.com') != -1 ||
host.indexOf('cocopilot.net') != -1 ||
host.indexOf('google.com') != -1) {
return 'PROXY 代理服务器地址:端口'; // 请替换'代理服务器地址:端口'为你的代理服务器地址和端口
}
return 'DIRECT'
}
`
Expand Down

0 comments on commit fb9ebe3

Please sign in to comment.