Merge remote-tracking branch 'origin/master'
commit
3920f033a0
19
README.md
19
README.md
|
@ -297,6 +297,21 @@ Error: www.github.com:443, 代理请求超时
|
|||
3、如果你是因为开着ds的情况下重启电脑导致无法上网,你可以设置ds为开机自启
|
||||
|
||||
|
||||
### 8、卸载应用后上不了网,git请求不了
|
||||
如果你在卸载应用前,没有正常退出app,就有可能无法上网。请按如下步骤操作恢复您的网络:
|
||||
|
||||
1、关闭系统代理设置,参见:[手动关闭系统代理设置](./doc/recover.md)
|
||||
2、执行下面的命令关闭git的代理设置(如果你开启过git.ext的开关)
|
||||
```shell
|
||||
git config --global --unset http.proxy
|
||||
git config --global --unset https.proxy
|
||||
```
|
||||
3、执行下面的命令关闭npm的代理设置(如果你开启过npm加速的开关)
|
||||
```shell
|
||||
npm config delete proxy
|
||||
npm config delete https-proxy
|
||||
```
|
||||
|
||||
## 七、在其他程序使用
|
||||
* [java程序使用](./doc/other.md#Java程序使用)
|
||||
|
||||
|
@ -335,12 +350,10 @@ npm run electron:build
|
|||
|
||||
1、 加群
|
||||
<div style="display: flex; justify-content:space-around;">
|
||||
<img style="margin-right:50px" height="230px" src="http://wxgroup.docmirror.cn/weixin/group/dev-sidecar/1qrcode.jpg">
|
||||
|
||||
<img height="230px" src="https://gitee.com/docmirror/dev-sidecar/raw/master/doc/qq_group.png">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
2、 加作者好友
|
||||
<div style="display: flex; justify-content:space-around;">
|
||||
<img height="200px" src="https://gitee.com/docmirror/dev-sidecar/raw/master/doc/me.png">
|
||||
|
|
|
@ -21,7 +21,29 @@
|
|||
plugin: {
|
||||
overwall: {
|
||||
targets: {
|
||||
'*azureedge.net': true
|
||||
'*azureedge.net': true,
|
||||
'github.com': true,
|
||||
'*wikimedia.org': true,
|
||||
'v2ex.com': true,
|
||||
'*cloudfront.net': true,
|
||||
'*bing.com': true,
|
||||
'*discourse-cdn.com': true,
|
||||
'*gravatar.com': true,
|
||||
'*docker.com': true,
|
||||
'*vueuse.org': true,
|
||||
'*elastic.co': true,
|
||||
'*optimizely.com': true,
|
||||
'*stackpathcdn.com': true,
|
||||
'*fastly.net': true,
|
||||
'*cloudflare.com': true,
|
||||
'*233v2.com': true,
|
||||
'*v2fly.org': true,
|
||||
'*telegram.org': true,
|
||||
'*amazon.com': true,
|
||||
'*googleapis.com': true,
|
||||
'*cloudflareinsights.com': true,
|
||||
'*.intlify.dev': true,
|
||||
'*segment.io': true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,26 @@ module.exports = {
|
|||
'github.com': true,
|
||||
'*wikimedia.org': true,
|
||||
'v2ex.com': true,
|
||||
'*azureedge.net': true
|
||||
'*azureedge.net': true,
|
||||
'*cloudfront.net': true,
|
||||
'*bing.com': true,
|
||||
'*discourse-cdn.com': true,
|
||||
'*gravatar.com': true,
|
||||
'*docker.com': true,
|
||||
'*vueuse.org': true,
|
||||
'*elastic.co': true,
|
||||
'*optimizely.com': true,
|
||||
'*stackpathcdn.com': true,
|
||||
'*fastly.net': true,
|
||||
'*cloudflare.com': true,
|
||||
'*233v2.com': true,
|
||||
'*v2fly.org': true,
|
||||
'*telegram.org': true,
|
||||
'*amazon.com': true,
|
||||
'*googleapis.com': true,
|
||||
'*cloudflareinsights.com': true,
|
||||
'*.intlify.dev': true,
|
||||
'*segment.io': true
|
||||
},
|
||||
pac: {
|
||||
enabled: true,
|
||||
|
|
|
@ -93,40 +93,15 @@ function connect (req, cltSocket, head, hostname, port, dnsConfig, sniRegexpMap)
|
|||
cltSocket.write('HTTP/1.1 200 Connection Established\r\n' +
|
||||
'Proxy-agent: dev-sidecar\r\n' +
|
||||
'\r\n')
|
||||
|
||||
log.info('proxy connect start', hostname)
|
||||
proxySocket.write(head)
|
||||
proxySocket.pipe(cltSocket)
|
||||
|
||||
cltSocket.pipe(proxySocket)
|
||||
// let sniReplaced = false
|
||||
// cltSocket.on('data', (chunk) => {
|
||||
// // if (replaceSni && sniReplaced === false) {
|
||||
// // const sniPackage = sniExtract(chunk)
|
||||
// // if (sniPackage != null) {
|
||||
// // sniReplaced = true
|
||||
// // const bytes = Buffer.from(replaceSni)
|
||||
// // const start = sniPackage.start
|
||||
// // const length = sniPackage.length
|
||||
// // for (let i = 0; i < length; i++) {
|
||||
// // let char = 97 // a 的ascii
|
||||
// // if (bytes.length > i) {
|
||||
// // char = bytes[i]
|
||||
// // }
|
||||
// // chunk[start + i] = char
|
||||
// // }
|
||||
// // }
|
||||
// // }
|
||||
// if (sniReplaced === false) {
|
||||
// sniReplaced = true
|
||||
// chunk[chunk.length - 1] = 1
|
||||
// }
|
||||
// proxySocket.write(chunk)
|
||||
// })
|
||||
// cltSocket.on('end', () => {
|
||||
// proxySocket.end()
|
||||
// })
|
||||
})
|
||||
|
||||
cltSocket.on('timeout', (e) => {
|
||||
log.error('cltSocket timeout', e.message, hostname)
|
||||
})
|
||||
cltSocket.on('error', (e) => {
|
||||
log.error('cltSocket error', e.message, hostname)
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue