things-go / go-socks5

socks5 server in pure Golang with much custom optional. Full TCP/UDP and IPv4/IPv6 support.
MIT License
412 stars 72 forks source link

add request to dial callback #45

Closed kotori2 closed 10 months ago

kotori2 commented 11 months ago

Close #44

kotori2 commented 11 months ago
> go test ./...
ok      github.com/things-go/go-socks5  (cached)
ok      github.com/things-go/go-socks5/bufferpool       5.189s
ok      github.com/things-go/go-socks5/statute  2.811s
thinkgos commented 11 months ago

@kotori2 Non-compatible change, suggest add another dial(Such as CustomDial) to overiwrite default dial, which priority higher than dial

kotori2 commented 11 months ago

@kotori2 Non-compatible change, suggest add another dial(Such as CustomDial) to overiwrite default dial, which priority higher than dial

Yeah that's what I'm thinking about in the first place... Gonna make this PR as draft first.

kotori2 commented 11 months ago

done

> go test ./...                
ok      github.com/things-go/go-socks5  1.378s
ok      github.com/things-go/go-socks5/bufferpool       4.424s
ok      github.com/things-go/go-socks5/statute  0.285s
codecov[bot] commented 11 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (6191a34) 62.19% compared to head (5438f4d) 63.13%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #45 +/- ## ========================================== + Coverage 62.19% 63.13% +0.94% ========================================== Files 14 14 Lines 775 784 +9 ========================================== + Hits 482 495 +13 + Misses 233 230 -3 + Partials 60 59 -1 ``` | [Flag](https://app.codecov.io/gh/things-go/go-socks5/pull/45/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=things-go) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/things-go/go-socks5/pull/45/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=things-go) | `63.13% <100.00%> (+0.94%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=things-go#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

kotori2 commented 11 months ago

Do I need to add test cases for the options?