feat(tooska): add proxy-scanner outbound#23
Open
hiddifyafk wants to merge 1 commit into
Open
Conversation
Embed the goBrrrr TCP proxy scanner as a new "tooska" outbound. It sweeps configured target IPs/CIDRs for working SOCKS5 / HTTP CONNECT proxies, scores each ip:port in [-10, +10] (dnstt-style), persists scores via the cache file, and tunnels traffic through the best-scored hits. A fresh background sweep fires on every dial, with a scanGate to coalesce. - protocol/hiddify/tooska/scanner: vendored goBrrrr — TCP dial sweep with 3-byte Tier-C fingerprint and deep SOCKS5+TLS / HTTP body validation. - protocol/hiddify/tooska: pool with hit/miss scoring, candidate expansion (CIDR/IP/IP:port) capped at 1M endpoints, bootstrap+post- connect scan loops, and proxy-fault vs destination-fault dial outcomes so transient destination failures don't crater proxy scores. - option/tooska.go, constant/proxy.go, include/registry.go: registration and TooskaOutboundOptions. - Tests for parseCandidates and pool scoring rules. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
6f41212 to
3c119f8
Compare
amirezatalebi
approved these changes
May 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tooskaoutbound that embeds the goBrrrr TCP proxy scanner. It sweeps configured target IPs/CIDRs for working SOCKS5 / HTTP CONNECT proxies, scores eachip:portin[-10, +10](dnstt-style), persists scores via the cache file, and tunnels traffic through the best-scored hits.scanGatecoalesces concurrent kicks. Dial failures distinguish proxy-fault (penalize score) from destination-fault (leave score alone) so transient destination outages don't crater the pool.Components
protocol/hiddify/tooska/scanner/— vendored goBrrrr: TCP dial sweep, 3-byte Tier-C fingerprint, deep SOCKS5+TLS validation againstwww.google.com:443 /generate_204, deep HTTP validation againstexample.com.protocol/hiddify/tooska/— pool (hit/miss scoring with floor/ceiling clamping, negative-score-resets-on-hit), candidate expansion, bootstrap + post-connect scan loops, score-then-tunnel routing.option/tooska.go,constant/proxy.go,include/registry.go—TooskaOutboundOptionsand registration.Config example
{ "type": "tooska", "tag": "tooska-out", "targets": ["10.0.0.0/24", "203.0.113.5:1080"], "ports": [1080, 8080, 3128], "concurrency": 256, "pool_size": 16 }Test plan
go build ./...— cleango test ./protocol/hiddify/tooska/...— 24 tests pass (parseCandidates: CIDR expansion, dedup, IPv6 bracketed/bare, port range, cap enforcement; pool: clamps, negative-reset-on-hit, ordering, scanGate mutex)🤖 Generated with Claude Code