Merge branch 'dev' of https://github.com/snail007/goproxy.git into dev
This commit is contained in:
@ -963,8 +963,15 @@ If you want to get a more detailed configuration and explanation of the KCP para
|
|||||||
```
|
```
|
||||||
|
|
||||||
### TODO
|
### TODO
|
||||||
|
- HTTP, socks proxy which has multi parents proxy load balancing?
|
||||||
|
- HTTP (s) proxy support PAC?
|
||||||
- Welcome joining group feedback...
|
- Welcome joining group feedback...
|
||||||
|
|
||||||
|
### How to contribute to the code?
|
||||||
|
First, you need to clone the project to your account, and then modify the code on the dev branch.
|
||||||
|
Finally, Pull Request to dev branch of goproxy project, and contribute code for efficiency.
|
||||||
|
PR needs to explain what changes have been made and why you change them.
|
||||||
|
|
||||||
### How to use the source code?
|
### How to use the source code?
|
||||||
Recommend go1.8.5, which does not guarantee that version >=1.9 can be used.
|
Recommend go1.8.5, which does not guarantee that version >=1.9 can be used.
|
||||||
`go get github.com/snail007/goproxy`
|
`go get github.com/snail007/goproxy`
|
||||||
|
|||||||
@ -4,7 +4,16 @@ rm -rf sdk-android-*.tar.gz
|
|||||||
rm -rf android
|
rm -rf android
|
||||||
mkdir android
|
mkdir android
|
||||||
|
|
||||||
#android
|
#android ; jdk,android ndk & android sdk required, install gomobile go1.10 required
|
||||||
|
#export GOPATH="$HOME/go"
|
||||||
|
#export GOROOT="/usr/local/go"
|
||||||
|
#export PATH="$GOROOT/bin:$GOPATH/bin:$PATH"
|
||||||
|
#export ANDROID_HOME="$HOME/Android/Sdk"
|
||||||
|
#export NDK_ROOT="$HOME/Android/Sdk/ndk-bundle"
|
||||||
|
#export PATH="$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$NDK_ROOT:$PATH"
|
||||||
|
#go get -v golang.org/x/mobile/cmd/gomobile
|
||||||
|
#gomobile init
|
||||||
|
|
||||||
gomobile bind -v -target=android -javapkg=snail007 -ldflags="-s -w"
|
gomobile bind -v -target=android -javapkg=snail007 -ldflags="-s -w"
|
||||||
mv proxy.aar android/snail007.goproxy.sdk.aar
|
mv proxy.aar android/snail007.goproxy.sdk.aar
|
||||||
mv proxy-sources.jar android/snail007.goproxy.sdk-sources.jar
|
mv proxy-sources.jar android/snail007.goproxy.sdk-sources.jar
|
||||||
|
|||||||
@ -368,7 +368,7 @@ func (s *SPS) OutToTCP(inConn *net.Conn) (err error) {
|
|||||||
if c, ok := s.userConns.Get(inAddr); ok {
|
if c, ok := s.userConns.Get(inAddr); ok {
|
||||||
(*c.(*net.Conn)).Close()
|
(*c.(*net.Conn)).Close()
|
||||||
}
|
}
|
||||||
s.userConns.Set(inAddr, &inConn)
|
s.userConns.Set(inAddr, inConn)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
func (s *SPS) InitBasicAuth() (err error) {
|
func (s *SPS) InitBasicAuth() (err error) {
|
||||||
|
|||||||
@ -148,7 +148,7 @@ func (s *TCP) OutToTCP(inConn *net.Conn) (err error) {
|
|||||||
if c, ok := s.userConns.Get(inAddr); ok {
|
if c, ok := s.userConns.Get(inAddr); ok {
|
||||||
(*c.(*net.Conn)).Close()
|
(*c.(*net.Conn)).Close()
|
||||||
}
|
}
|
||||||
s.userConns.Set(inAddr, &inConn)
|
s.userConns.Set(inAddr, inConn)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
func (s *TCP) OutToUDP(inConn *net.Conn) (err error) {
|
func (s *TCP) OutToUDP(inConn *net.Conn) (err error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user