mosajjal / sniproxy

SNI Proxy with Embedded DNS Server
BSD 2-Clause "Simplified" License
177 stars 38 forks source link

Error at start #91

Closed NoAnyNameForMe closed 11 months ago

NoAnyNameForMe commented 11 months ago

Hi, thanks for sharing i got this error. when sniproxy want to start.

root@xx:~# sudo systemctl status sniproxy
● sniproxy.service - sniproxy
     Loaded: loaded (/etc/systemd/system/sniproxy.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2023-12-01 19:32:20 MSK; 5min ago
   Main PID: 52806 (sniproxy)
      Tasks: 4 (limit: 2237)
     Memory: 15.5M
        CPU: 243ms
     CGroup: /system.slice/sniproxy.service
             └─52806 /opt/sniproxy/sniproxy --config /opt/sniproxy/sniproxy.yaml

[52806]: 2023-12-01T19:32:21+03:00 ERR github/workspace/dns.go:193 > listen tcp: address true: missing port in address service=dns
[52806]: 2023-12-01T19:32:21+03:00 INF github/workspace/dns.go:152 > started udp dns on 0.0.0.0:53 service=dns
[52806]: 2023-12-01T19:32:21+03:00 INF github/workspace/dns.go:166 > started tcp dns on true service=dns
[52806]: 2023-12-01T19:32:21+03:00 ERR github/workspace/dns.go:170 > failed to start server listen tcp: address true: missing port in address service=dns
52806]: 2023-12-01T19:32:21+03:00 INF github/workspace/dns.go:171 > failed to start server: 0.0.0.0:53
[52806]: you can run the following command to pinpoint which process is listening on your bind
[52806]: sudo ss -pltun service=dns
[52806]: 2023-12-01T19:35:27+03:00 INF github/workspace/dns.go:63 > returned sniproxy address for domain www.bing.com. service=dns
[52806]: 2023-12-01T19:35:27+03:00 INF github/workspace/dns.go:63 > returned sniproxy address for domain www.msftncsi.com. service=dns
[52806]: 2023-12-01T19:35:27+03:00 INF github/workspace/dns.go:63 > returned sniproxy address for domain www.msftncsi.com. service=dns
root@xx:~#
Started sniproxy.
sniproxy[52572]: 2023-12-01T19:31:55+03:00 INF starting sniproxy. version v2.0.3, commit bb94fc501f875a260d402c4a9d887d6b6c77b177
sniproxy[52572]: 2023-12-01T19:31:55+03:00 INF github/workspace/main.go:328 > server info public_ip=x.x.x.x
sniproxy[52572]: 2023-12-01T19:31:55+03:00 INF github/workspace/main.go:334 > server info public_ip=x::2
sniproxy[52572]: 2023-12-01T19:31:55+03:00 INF github/workspace/main.go:342 > certificate was not provided, generating a self signed cert in temp directory
sniproxy[52572]: 2023-12-01T19:31:55+03:00 ERR github/workspace/dns.go:217 > could not start QUIC listener: address true: missing port in address service=dns
sniproxy[52572]: 2023-12-01T19:31:55+03:00 INF github/workspace/dns.go:221 > starting quic listener true service=dns
sniproxy[52572]: panic: runtime error: invalid memory address or nil pointer dereference
sniproxy[52572]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x99052a]
sniproxy[52572]: goroutine 17 [running]:
sniproxy[52572]: github.com/mosajjal/doqd/pkg/server.(*Server).Listen(0x0)
sniproxy[52572]:         /go/pkg/mod/github.com/mosajjal/doqd@v0.0.0-20230511083851-8f2810faeb07/pkg/server/main.go:60 +0x2a
sniproxy[52572]: created by main.runDNS
sniproxy[52572]:         /github/workspace/dns.go:222 +0x6aa
systemd[1]: sniproxy.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
systemd[1]: sniproxy.service: Failed with result 'exit-code'.
mosajjal commented 11 months ago

Hi, thanks for reporting this error. this is now fixed in the latest commit. please re-run the script and let me know if there's any other issues.

NoAnyNameForMe commented 11 months ago

Hi, thanks for reporting this error. this is now fixed in the latest commit. please re-run the script and let me know if there's any other issues.

Hi again, thanks. in installation for any option when want to enable. (y) got error TLS TCP QUIC

sniproxy can proxy all HTTPS traffic or only specific domains, if you have a domain list URL, enter it below, otherwise press Enter to proxy all HTTPS traffic

Do you want to enable DNS over TCP? (y/n)
y
Error: bad expression, please check expression syntax
mosajjal commented 11 months ago

can you please test again. just pushed another fix.

NoAnyNameForMe commented 11 months ago

now its fine. just one error i dont know it's ok or not

Dec 02 12:35:52 impolite-honey.aeza.network systemd[1]: Started sniproxy.
Dec 02 12:35:52 impolite-honey.aeza.network sniproxy[1314]: 2023-12-02T12:35:52+03:00 INF starting sniproxy. version v2.0.3, commit bb94fc501f875a260d402c4a9d887d6b6c77b177
Dec 02 12:35:52 impolite-honey.aeza.network sniproxy[1314]: 2023-12-02T12:35:52+03:00 INF github/workspace/main.go:328 > server info public_ip=xxxx
Dec 02 12:35:52 impolite-honey.aeza.network sniproxy[1314]: 2023-12-02T12:35:52+03:00 INF github/workspace/main.go:334 > server info public_ip=xxx
Dec 02 12:35:52 impolite-honey.aeza.network sniproxy[1314]: 2023-12-02T12:35:52+03:00 INF github/workspace/main.go:342 > certificate was not provided, generating a self signed cert in temp directory
Dec 02 12:35:52 impolite-honey.aeza.network sniproxy[1314]: 2023-12-02T12:35:52+03:00 ??? failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Receive-Buffer-Size for details.
Dec 02 12:35:52 impolite-honey.aeza.network sniproxy[1314]: 2023-12-02T12:35:52+03:00 INF github/workspace/dns.go:221 > starting quic listener 0.0.0.0:8853 service=dns
Dec 02 12:35:52 impolite-honey.aeza.network sniproxy[1314]: 2023-12-02T12:35:52+03:00 INF github/workspace/dns.go:152 > started udp dns on 0.0.0.0:53 service=dns
Dec 02 12:35:52 impolite-honey.aeza.network sniproxy[1314]: 2023-12-02T12:35:52+03:00 INF github/workspace/dns.go:166 > started tcp dns on 0.0.0.0:53 service=dns
Dec 02 12:35:52 impolite-honey.aeza.network sniproxy[1314]: 2023-12-02T12:35:52+03:00 INF github/workspace/dns.go:189 > started dot dns on 0.0.0.0:853 service=dns

Dec 02 12:35:52 impolite-honey.aeza.network sniproxy[1314]: 2023-12-02T12:35:52+03:00 ??? failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Receive-Buffer-Size for details.

mosajjal commented 11 months ago

that's more of a warning rather than an error. should be ok to ignore