Skip to content

Commit

Permalink
Remove IP from domain map
Browse files Browse the repository at this point in the history
  • Loading branch information
macronut committed Nov 28, 2023
1 parent 8b0ac27 commit 03f58b4
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions phantomtcp/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,20 +292,14 @@ func tcp_redirect(client net.Conn, addr *net.TCPAddr, domain string, header []by

var pface *PhantomInterface = nil
if domain == "" {
var ok bool
pface, ok = DefaultProfile.DomainMap[domain]
if !ok {
pface = DefaultProfile.GetInterfaceByIP(addr.IP)
}
pface = DefaultProfile.GetInterfaceByIP(addr.IP)
if pface != nil {
domain = addr.IP.String()
}
} else {
pface = DefaultProfile.GetInterface(domain)
}

logPrintln(1, pface)

if pface != nil && (pface.Protocol != 0 || pface.Hint != 0) {
if pface.Hint&HINT_NOTCP != 0 {
time.Sleep(time.Second)
Expand Down

0 comments on commit 03f58b4

Please sign in to comment.