[GH-ISSUE #271] runtime error: invalid memory address or nil pointer dereference #189

Closed
opened 2026-02-27 23:15:51 +03:00 by kerem · 15 comments
Owner

Originally created by @pinghe on GitHub (May 15, 2019).
Original GitHub issue: https://github.com/snail007/goproxy/issues/271

7.3 7.4 has this problem

http(s) conn handler crashed with err : runtime error: invalid memory address or nil pointer dereference
stack: goroutine 4879 [running]:
runtime/debug.Stack()
/usr/local/go/src/runtime/debug/stack.go:24 +0x9d
github.com/snail007/proxy/services/http.(*HTTP).callback.func1()
/home/go/src/github.com/snail007/proxy/services/http/http.go:347 +0x57
panic()
/usr/local/go/src/runtime/panic.go:522 +0x1b5
github.com/snail007/proxy/services/http.(*HTTP).OutToTCP()
/home/go/src/github.com/snail007/proxy/services/http/http.go:458 +0x5ab
github.com/snail007/proxy/services/http.(*HTTP).callback()
/home/go/src/github.com/snail007/proxy/services/http/http.go:394 +0x4f6
github.com/snail007/proxy/core/cs/server.(*ServerChannel).ListenTCP.func1.2()
/home/go/src/github.com/snail007/proxy/core/cs/server/server.go:163 +0x60
created by github.com/snail007/proxy/core/cs/server.(*ServerChannel).ListenTCP.func1

Originally created by @pinghe on GitHub (May 15, 2019). Original GitHub issue: https://github.com/snail007/goproxy/issues/271 7.3 7.4 has this problem http(s) conn handler crashed with err : runtime error: invalid memory address or nil pointer dereference stack: goroutine 4879 [running]: runtime/debug.Stack() /usr/local/go/src/runtime/debug/stack.go:24 +0x9d github.com/snail007/proxy/services/http.(*HTTP).callback.func1() /home/go/src/github.com/snail007/proxy/services/http/http.go:347 +0x57 panic() /usr/local/go/src/runtime/panic.go:522 +0x1b5 github.com/snail007/proxy/services/http.(*HTTP).OutToTCP() /home/go/src/github.com/snail007/proxy/services/http/http.go:458 +0x5ab github.com/snail007/proxy/services/http.(*HTTP).callback() /home/go/src/github.com/snail007/proxy/services/http/http.go:394 +0x4f6 github.com/snail007/proxy/core/cs/server.(*ServerChannel).ListenTCP.func1.2() /home/go/src/github.com/snail007/proxy/core/cs/server/server.go:163 +0x60 created by github.com/snail007/proxy/core/cs/server.(*ServerChannel).ListenTCP.func1
kerem 2026-02-27 23:15:51 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@snail007 commented on GitHub (May 15, 2019):

show full command of starting and version of proxy

<!-- gh-comment-id:492602759 --> @snail007 commented on GitHub (May 15, 2019): show full command of starting and version of proxy
Author
Owner

@pinghe commented on GitHub (May 16, 2019):

./proxy http --always -t tcp -p ":1080" -T tls -P "vpshost:1080" -C proxy.crt -K proxy.key -b proxy_blocked -d proxy_direct --forever --log proxy.log --daemon --jumper http://myhttpproxyhost:80
<!-- gh-comment-id:492985437 --> @pinghe commented on GitHub (May 16, 2019): ``` ./proxy http --always -t tcp -p ":1080" -T tls -P "vpshost:1080" -C proxy.crt -K proxy.key -b proxy_blocked -d proxy_direct --forever --log proxy.log --daemon --jumper http://myhttpproxyhost:80 ```
Author
Owner

@snail007 commented on GitHub (May 16, 2019):

your error info seems like proxy version of 7.3, please using 7.4 and show me details about logging.

<!-- gh-comment-id:492991974 --> @snail007 commented on GitHub (May 16, 2019): your error info seems like proxy version of 7.3, please using 7.4 and show me details about logging.
Author
Owner

@pinghe commented on GitHub (May 25, 2019):

7.4

http(s) conn handler crashed with err : runtime error: invalid memory address or nil pointer dereference
stack: goroutine 4063 [running]:
runtime/debug.Stack
        /usr/local/go/src/runtime/debug/stack.go:24 
github.com/snail007/proxy/services/http.(*HTTP).callback.func1()
        /home/go/src/github.com/snail007/proxy/services/http/http.go:347 
panic()
        /usr/local/go/src/runtime/panic.go:522 
github.com/snail007/proxy/services/http.(*HTTP).OutToTCP()
        /home/go/src/github.com/snail007/proxy/services/http/http.go:458 
github.com/snail007/proxy/services/http.(*HTTP).callback()
        /home/go/src/github.com/snail007/proxy/services/http/http.go:394 
github.com/snail007/proxy/core/cs/server.(*ServerChannel).ListenTCP.func1.2()
        /home/go/src/github.com/snail007/proxy/core/cs/server/server.go:163 
created by github.com/snail007/proxy/core/cs/server.(*ServerChannel).ListenTCP.func1
        /home/go/src/github.com/snail007/proxy/core/cs/server/server.go:157 
<!-- gh-comment-id:495865275 --> @pinghe commented on GitHub (May 25, 2019): 7.4 ``` http(s) conn handler crashed with err : runtime error: invalid memory address or nil pointer dereference stack: goroutine 4063 [running]: runtime/debug.Stack /usr/local/go/src/runtime/debug/stack.go:24 github.com/snail007/proxy/services/http.(*HTTP).callback.func1() /home/go/src/github.com/snail007/proxy/services/http/http.go:347 panic() /usr/local/go/src/runtime/panic.go:522 github.com/snail007/proxy/services/http.(*HTTP).OutToTCP() /home/go/src/github.com/snail007/proxy/services/http/http.go:458 github.com/snail007/proxy/services/http.(*HTTP).callback() /home/go/src/github.com/snail007/proxy/services/http/http.go:394 github.com/snail007/proxy/core/cs/server.(*ServerChannel).ListenTCP.func1.2() /home/go/src/github.com/snail007/proxy/core/cs/server/server.go:163 created by github.com/snail007/proxy/core/cs/server.(*ServerChannel).ListenTCP.func1 /home/go/src/github.com/snail007/proxy/core/cs/server/server.go:157 ```
Author
Owner

@snail007 commented on GitHub (May 25, 2019):

bug confirmed,fixed in next version.

<!-- gh-comment-id:495871039 --> @snail007 commented on GitHub (May 25, 2019): bug confirmed,fixed in next version.
Author
Owner

@pinghe commented on GitHub (Jun 10, 2019):

v7.5

2019/06/11 01:16:14 forever ./proxy [PID] 4372 running...
2019/06/11 01:16:14 worker ./proxy [PID] 4381 running...
2019/06/11 01:16:14 blocked file loaded , domains : 4833
2019/06/11 01:16:14 direct file loaded , domains : 456
2019/06/11 01:16:14 use tls parent [myvps.com:80] [ ROUNDROBIN ]
2019/06/11 01:16:14 tcp http(s) proxy on [::]:80


2019/06/11 01:17:19 worker ./proxy [PID] 4381 unexpected exited, restarting...
What's going on


2019/06/11 01:17:24 worker ./proxy [PID] 4817 running...
2019/06/11 01:17:24 blocked file loaded , domains : 4833
....


<!-- gh-comment-id:500348769 --> @pinghe commented on GitHub (Jun 10, 2019): v7.5 ``` 2019/06/11 01:16:14 forever ./proxy [PID] 4372 running... 2019/06/11 01:16:14 worker ./proxy [PID] 4381 running... 2019/06/11 01:16:14 blocked file loaded , domains : 4833 2019/06/11 01:16:14 direct file loaded , domains : 456 2019/06/11 01:16:14 use tls parent [myvps.com:80] [ ROUNDROBIN ] 2019/06/11 01:16:14 tcp http(s) proxy on [::]:80 2019/06/11 01:17:19 worker ./proxy [PID] 4381 unexpected exited, restarting... What's going on 2019/06/11 01:17:24 worker ./proxy [PID] 4817 running... 2019/06/11 01:17:24 blocked file loaded , domains : 4833 .... ```
Author
Owner

@snail007 commented on GitHub (Jun 10, 2019):

use --log ,get logging of worker。

<!-- gh-comment-id:500353908 --> @snail007 commented on GitHub (Jun 10, 2019): use --log ,get logging of worker。
Author
Owner

@pinghe commented on GitHub (Jun 10, 2019):

https://github.com/snail007/goproxy/issues/271#issuecomment-492985437

already has --log

<!-- gh-comment-id:500382493 --> @pinghe commented on GitHub (Jun 10, 2019): https://github.com/snail007/goproxy/issues/271#issuecomment-492985437 already has --log
Author
Owner

@snail007 commented on GitHub (Jun 10, 2019):

show the full logging, or exec:

./proxy http  -t tcp -p ":1080" -T tls -P "vpshost:1080" -C proxy.crt -K proxy.key -b proxy_blocked -d proxy_direct  --jumper http://myhttpproxyhost:80 >tmp.log 2>&1 &

then show me the tmp.log.

<!-- gh-comment-id:500383198 --> @snail007 commented on GitHub (Jun 10, 2019): show the full logging, or exec: ``` ./proxy http -t tcp -p ":1080" -T tls -P "vpshost:1080" -C proxy.crt -K proxy.key -b proxy_blocked -d proxy_direct --jumper http://myhttpproxyhost:80 >tmp.log 2>&1 & ``` then show me the tmp.log.
Author
Owner

@pinghe commented on GitHub (Jun 10, 2019):

2019/06/11 03:58:01 worker ./proxy [PID] 19745 running...
proxy free version 7.5  by snail , email : arraykeys@gmail.com
2019/06/11 03:58:01 blocked file loaded , domains : 4833
2019/06/11 03:58:01 direct file loaded , domains : 456
2019/06/11 03:58:01 use tls parent [myvps:80] [ ROUNDROBIN ]
2019/06/11 03:58:01 tcp http(s) proxy on [::]:80
2019/06/11 03:59:06 check update fail, please check your network
2019/06/11 03:59:06 worker ./proxy [PID] 19745 unexpected exited, restarting...
2019/06/11 03:59:11 worker ./proxy [PID] 20185 running...
proxy free version 7.5  by snail , email : arraykeys@gmail.com
2019/06/11 03:59:12 blocked file loaded , domains : 4833
2019/06/11 03:59:12 direct file loaded , domains : 456
2019/06/11 03:59:12 use tls parent [myvps:80] [ ROUNDROBIN ]
2019/06/11 03:59:12 tcp http(s) proxy on [::]:80
curl -x myhttpproxyhost:80 http://www.apache.org

It returned 200
<!-- gh-comment-id:500390156 --> @pinghe commented on GitHub (Jun 10, 2019): ``` 2019/06/11 03:58:01 worker ./proxy [PID] 19745 running... proxy free version 7.5 by snail , email : arraykeys@gmail.com 2019/06/11 03:58:01 blocked file loaded , domains : 4833 2019/06/11 03:58:01 direct file loaded , domains : 456 2019/06/11 03:58:01 use tls parent [myvps:80] [ ROUNDROBIN ] 2019/06/11 03:58:01 tcp http(s) proxy on [::]:80 2019/06/11 03:59:06 check update fail, please check your network 2019/06/11 03:59:06 worker ./proxy [PID] 19745 unexpected exited, restarting... 2019/06/11 03:59:11 worker ./proxy [PID] 20185 running... proxy free version 7.5 by snail , email : arraykeys@gmail.com 2019/06/11 03:59:12 blocked file loaded , domains : 4833 2019/06/11 03:59:12 direct file loaded , domains : 456 2019/06/11 03:59:12 use tls parent [myvps:80] [ ROUNDROBIN ] 2019/06/11 03:59:12 tcp http(s) proxy on [::]:80 ``` ``` curl -x myhttpproxyhost:80 http://www.apache.org It returned 200 ```
Author
Owner

@snail007 commented on GitHub (Jun 10, 2019):

check update fail, please check your network,your server must can be access Internet network

<!-- gh-comment-id:500391697 --> @snail007 commented on GitHub (Jun 10, 2019): check update fail, please check your network,your server must can be access Internet network
Author
Owner

@pinghe commented on GitHub (Jun 11, 2019):

my server can access the Internet network.

client

curl -x myhttpproxyhost:80 http://www.apache.org

It returned 200

vpshost

curl  http://www.apache.org

It returned 200
<!-- gh-comment-id:500675815 --> @pinghe commented on GitHub (Jun 11, 2019): my server can access the Internet network. client ``` curl -x myhttpproxyhost:80 http://www.apache.org It returned 200 ``` vpshost ``` curl http://www.apache.org It returned 200 ```
Author
Owner

@snail007 commented on GitHub (Jun 11, 2019):

try : curl https://lic00.host900.com on your server.

<!-- gh-comment-id:500677996 --> @snail007 commented on GitHub (Jun 11, 2019): try : `curl https://lic00.host900.com` on your server.
Author
Owner

@pinghe commented on GitHub (Jun 11, 2019):

z.txt

<!-- gh-comment-id:500707773 --> @pinghe commented on GitHub (Jun 11, 2019): [z.txt](https://github.com/snail007/goproxy/files/3275043/z.txt)
Author
Owner

@snail007 commented on GitHub (Jun 11, 2019):

it seems your public IP is blocked by cloudflare, can you show me the IP, and i add it to whitelist.

<!-- gh-comment-id:500736420 --> @snail007 commented on GitHub (Jun 11, 2019): it seems your public IP is blocked by cloudflare, can you show me the IP, and i add it to whitelist.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/goproxy#189
No description provided.