Skip to content

Commit febd0b4

Browse files
committed
Add more logging
1 parent 7b45b89 commit febd0b4

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/bitlux/caches
33
go 1.23.4
44

55
require (
6-
github.com/bitlux/vpnapi v0.0.0-20250207215125-f066bb2314a4
6+
github.com/bitlux/vpnapi v0.0.0-20250217222132-63c262807319
77
github.com/d4l3k/go-bfloat16 v0.0.0-20211005043715-690c3bdd05f1
88
github.com/keep94/sqroot/v3 v3.7.2
99
)

go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
github.com/bitlux/vpnapi v0.0.0-20250207215125-f066bb2314a4 h1:zYVWlKFsyl3tMu3Ak9es+EMW2DUe9nqPQaOQNBtu2XQ=
22
github.com/bitlux/vpnapi v0.0.0-20250207215125-f066bb2314a4/go.mod h1:ou6ccQPRIv8uzPNeLaRLxnwd2felkT30fwGnJtbVYCg=
3+
github.com/bitlux/vpnapi v0.0.0-20250217222132-63c262807319 h1:wfPTZ1VuQP/IecBGOW+2sNAzqd5hdRdU5+Wh14jiho4=
4+
github.com/bitlux/vpnapi v0.0.0-20250217222132-63c262807319/go.mod h1:ou6ccQPRIv8uzPNeLaRLxnwd2felkT30fwGnJtbVYCg=
35
github.com/d4l3k/go-bfloat16 v0.0.0-20211005043715-690c3bdd05f1 h1:cBzrdJPAFBsgCrDPnZxlp1dF2+k4r1kVpD7+1S1PVjY=
46
github.com/d4l3k/go-bfloat16 v0.0.0-20211005043715-690c3bdd05f1/go.mod h1:uw2gLcxEuYUlAd/EXyjc/v55nd3+47YAgWbSXVxPrNI=
57
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=

ipieces/ipieces.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,9 @@ func (p Puzzle) handle(w http.ResponseWriter, req *http.Request, tmpl *template.
211211

212212
if p.Client != nil {
213213
resp, err := p.Client.Query(d.IP)
214+
if resp.Message != "" {
215+
fmt.Println("Response message:", resp.Message)
216+
}
214217
if err != nil {
215218
if err == vpnapi.ErrRateLimited {
216219
writeResponse(w, http.StatusTooManyRequests, rateLimitPage, "rate limited: %v\n", err)
@@ -222,7 +225,7 @@ func (p Puzzle) handle(w http.ResponseWriter, req *http.Request, tmpl *template.
222225
}
223226

224227
if resp.Security.VPN || resp.Security.Proxy || resp.Security.Tor || resp.Security.Relay {
225-
writeResponse(w, http.StatusForbidden, vpnPage, "%t %t %t %t\n", resp.Security.VPN, resp.Security.Proxy, resp.Security.Tor, resp.Security.Relay)
228+
writeResponse(w, http.StatusForbidden, vpnPage, "VPN: %t Proxy: %t Tor: %t Relay: %t\n", resp.Security.VPN, resp.Security.Proxy, resp.Security.Tor, resp.Security.Relay)
226229
return
227230
}
228231
}

0 commit comments

Comments
 (0)