Comments (8)
cd $GOPATH/src/github.com/phuslu/
rm -rf glog
git clone --depth 1 https://github.com/phuslu/glog
cd $BUILD_ROOT/goproxy/
grep RequestConnectionIDTruncation . -rl | xargs -I {} sed -i "s/RequestConnectionIDTruncation/RequestConnectionIDOmission/g" {}
grep DialTCPContext . -rl | xargs -I {} sed -i "s/DialTCPContext(ctx, network, nil, raddr)/DialTCPContext(ctx, network, nil, raddr, nil)/g" {}
from goproxy.
谢谢 Peytonlan
这两个问题已经解决
另外 is not using a known version control system 这个问题因为golang.org被墻,翻上去看好像指向文件的下载被转到github上了,网上搜到这个 https://golangtc.com/t/56f3c175b09ecc66b9000181
就是把 golang.org/x/ 替换成 github.com/golang/ ,把整个 crypto,net ,sys,text go get -u 下来,然后把整支拷贝到golang.org/x/下,
这样,编译能顺利通过,make一下就出来了。
但是,新的问题出来了,编译出来的比如windows下的程序出现错误异常。。。
log较长,贴图片看吧,唔
from goproxy.
抱歉, Windows几乎不用
Linux下的运行正常么
先确定下这个问题是否和平台有关
from goproxy.
没有linux,不过编了个android的试了下,情况是一样的
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x34 pc=0x2e9eb4]
goroutine 241 [running]:
github.com/phuslu/quic-go.(*streamFramer).maybePopNormalFrames(0x1246a900, 0x48e, 0x0, 0x0, 0x0, 0x0)
/usr/src/goproxy/gopath/src/github.com/phuslu/quic-go/stream_framer.go:121 +0x1b4
github.com/phuslu/quic-go.(*streamFramer).PopStreamFrames(0x1246a900, 0x48e, 0x0, 0x0, 0x1, 0x11f1d650)
/usr/src/goproxy/gopath/src/github.com/phuslu/quic-go/stream_framer.go:57 +0x70
github.com/phuslu/quic-go.(*packetPacker).composeNextPacket(0x12462c30, 0x499, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1200ed4c, 0x2e645c)
/usr/src/goproxy/gopath/src/github.com/phuslu/quic-go/packet_packer.go:269 +0x320
github.com/phuslu/quic-go.(*packetPacker).PackPacket(0x12462c30, 0x0, 0x0, 0x0)
/usr/src/goproxy/gopath/src/github.com/phuslu/quic-go/packet_packer.go:159 +0x170
github.com/phuslu/quic-go.(*session).sendPacket(0x11c85c00, 0xbe929701, 0x6b4ed659, 0x21)
/usr/src/goproxy/gopath/src/github.com/phuslu/quic-go/session.go:826 +0x4c4
github.com/phuslu/quic-go.(*session).run(0x11c85c00, 0x0, 0x0)
/usr/src/goproxy/gopath/src/github.com/phuslu/quic-go/session.go:434 +0xb8
github.com/phuslu/quic-go.(*client).establishSecureConnection.func1(0x123ec660, 0x120ccd28, 0x12500340)
/usr/src/goproxy/gopath/src/github.com/phuslu/quic-go/client.go:216 +0x28
created by github.com/phuslu/quic-go.(*client).establishSecureConnection
/usr/src/goproxy/gopath/src/github.com/phuslu/quic-go/client.go:215 +0x6c
可能原因是源码的改动部分,或者是引用的库quic-go版本问题导致有些变动?
update:试了下tls,暂时没错误,那可能是引用库问题。
from goproxy.
空指针的问题quic-go上游已修复, 等 @phuslu 同步上游代码, 或者手工打补丁
quic-go/quic-go@0b9d805
from goproxy.
Thank you @Peytonlan very much.
Now I could build a working application under your help.
My intention is to try reducing the battery consumption on mobile devices.
By modifying following parameters I can manager extending the screen on time from 50% to 70% and extending the stand by time from 20% to 90%.
gae.json:
KeepAlive 5 ---> 240
Level 8 ---> 3
Timeout 5 ---> 240
IdleConnTimeout 5 ---> 240
Here Timeout is looking for new good_addr ,so enlarge it is reduing the dail frequency which is good for screen on time and bad for downloading and sometimes you need to wait minutes under normal using.
IdleConnTimeout is reducing dial frequency in the background under system idle which related to stand by time.
Keep enlarging these has nothing better but worse to normal use.
So,I need two configuration file modified one for normal use and original one for download.
Even that compacts battery a lot.A normal use with SOT 10 hours reduced to 7 hours and even worse if you are moving that makes program dials more.
So,I looked into code to see whether there's some parameters can be modified.
Here came with two proposals.
One is modifying following parameters:
gae.go
line 309 KeepAliveTimeout 2 ---> 4
quic.go
line 40 IdleTimeout 10 ---> to some minutes
Another better one is change the dealing policy but much harder.
Only dial when it receives data request.
Just acting like the program started but now every time and only time it received the request,and keep a short time(it said 4 minutes allowed for gae of every ip?) with the picked good_addr from every selection.
A short time with full cpu power (even with every 4 minutes cycle) is much less battery consumption than keeping using data connection.
(Please excuse for sensitive reason that using english)
from goproxy.
grrr...
I've made a misunderstanding about the parameter "EnableDeadProbe" and its description in ConfigIntroduce.md is obscure.
Having a clear view of time related codes is hard for me ,so it's confusing when adjusting some of them after some tries.
So at the same time I'm seeking the second method that the protocol how it handles about sending and receiving datas. grrr...even harder.
Back to method one ,I've notice "isNetAvailable" just a few lines up "Timeout()" in gae.go of line 390.
It returns empty if false or dial roundtrip. A few lines up ,turns out the request I want.
Finally ,setting parameter "EnableDeadProbe" false in gae.json meets the "quiet at background dial at demond" and no need to change time related parameters.
The test shows it right meet the battery saving demand.
Cheer to phuslu.
About another tip is about the download .
If you feel unhappy with download using this product ,put // before "Default"- "RequestFilters" - "autorange" in httpproxy.json.
Yea,just don't use that and using ADM for the downloading .
from goproxy.
EnableDeadProbe 这个配置参数的确需要留意, 应该默认设为 false 要好些
from goproxy.
Related Issues (20)
- goproxy-简单配置速度 HOT 24
- 希望社长一切都好
- bug- php hosts The hosts parameter is invalid~ HOT 1
- gp的最新项目地址在,目前版本为1651 HOT 23
- test HOT 1
- 如何连接Google Cloud Shell?
- 求好用的sni扫描工具,谢谢各位朋友。 HOT 3
- 下载地址有吗?只有这个还能用吗?
- 我之前用的是xxnet,已经部署过的appid是否需要再次部署? HOT 2
- goproxy vps 能不能设置全局代理
- 今天试了下GP,已复活了 HOT 2
- goproxy还支持在php环境下部署吗?谁有教程? HOT 1
- goproxy vps 报错“acme/autocert: missing certificate” HOT 1
- 出现错误:“502 Bad Gateway. This HTTP request has a Host header that is not covered by the TLS certificate used. ” HOT 4
- wsarecv: An established connection was aborted by the software in your host machine HOT 1
- 请教如何自定义PAC,想让某个网址在PAC模式下用代理打开。
- 出现几条错误请问是怎么回事。
- 除了直连,还能如何使用谷歌学术? HOT 4
- 社长安好,今天在github新建了一个项目和更新了一个项目。
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goproxy.