Skip to content

Commit

Permalink
Fix: HTTP sniff
Browse files Browse the repository at this point in the history
  • Loading branch information
AkinoKaede committed Nov 29, 2022
1 parent 9bbc3af commit 82c42fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/dispatcher/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func shouldOverride(result SniffResult, domainOverride []string) bool {
protocolString = resComp.ProtocolForDomainResult()
}
for _, p := range domainOverride {
if strings.HasPrefix(p, protocolString) {
if strings.HasPrefix(protocolString, p) && strings.HasSuffix(protocolString, p) {
return true
}
if resultSubset, ok := result.(SnifferIsProtoSubsetOf); ok {
Expand Down
3 changes: 3 additions & 0 deletions app/reverse/portal.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ func (p *StaticMuxPicker) PickAvailable() (*mux.ClientWorker, error) {
if w.draining {
continue
}
if w.client.Closed() {
continue
}
if w.client.ActiveConnections() < minConn {
minConn = w.client.ActiveConnections()
minIdx = i
Expand Down

0 comments on commit 82c42fc

Please sign in to comment.