Commit ea8525b9 authored by wang's avatar wang

cronet

parent ae77a4bb
No preview for this file type
...@@ -3,6 +3,6 @@ apt update ...@@ -3,6 +3,6 @@ apt update
apt install libnss3-dev apt install libnss3-dev
apt install libglib2.0-dev apt install libglib2.0-dev
#cd /root/src/js && npm i && nohup /usr/local/bin/node --expose-gc --max-old-space-size=256 cursor_mock.js > 1.log 2>&1 & #cd /root/src/js && npm i && nohup /usr/local/bin/node --expose-gc --max-old-space-size=256 cursor_mock.js > 1.log 2>&1 &
export set CGO_CFLAGS="-I/home/opt/cronet-forward/cronet/include" export set CGO_CFLAGS="-I/Users/wang/chromium/src/out/Cronet/cronet/include"
export set CGO_LDFLAGS="-Wl,-rpath,/home/opt/cronet-forward/cronet -L/home/opt/cronet-forward/cronet -lcronet" export set CGO_LDFLAGS="-Wl,-rpath,/Users/wang/chromium/src/out/Cronet/cronet -L/Users/wang/chromium/src/out/Cronet/cronet -lcronet"
cd /home/opt/tls-forward/ && go run main.go cd /home/opt/tls-forward/ && go run main.go
\ No newline at end of file
...@@ -52,10 +52,13 @@ func (c *Client) Start() error { ...@@ -52,10 +52,13 @@ func (c *Client) Start() error {
cks := strings.Split(cookie, "; ") cks := strings.Split(cookie, "; ")
for _, ck := range cks { for _, ck := range cks {
t := strings.Index(ck, "=") t := strings.Index(ck, "=")
cookies = append(cookies, &http.Cookie{ if t != -1 {
Name: ck[:t], cookies = append(cookies, &http.Cookie{
Value: ck[t+1:], Name: ck[:t],
}) Value: ck[t+1:],
})
}
} }
c.Jar.SetCookies(uri, cookies) c.Jar.SetCookies(uri, cookies)
if err != nil { if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment