Skip to content

Commit

Permalink
removed binary
Browse files Browse the repository at this point in the history
  • Loading branch information
mosajjal committed Sep 7, 2024
1 parent 66ab46a commit 2d60284
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Binary file removed cmd/sniproxy/sniproxy
Binary file not shown.
11 changes: 7 additions & 4 deletions pkg/https.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ import (
// checks if the IP is the sniproxy itself
func isSelf(c *Config, ip netip.Addr) bool {
condition1 := ip.IsLoopback() ||
ip.IsPrivate() ||
ip == (netip.IPv4Unspecified()) ||
ip == netip.MustParseAddr(c.PublicIPv4) ||
ip == netip.MustParseAddr(c.PublicIPv6)
ip.IsPrivate() || ip == (netip.IPv4Unspecified())

if c.PublicIPv4 != "" {
condition1 = condition1 || (ip == netip.MustParseAddr(c.PublicIPv4))
}
if c.PublicIPv6 != "" {
condition1 = condition1 || (ip == netip.MustParseAddr(c.PublicIPv6))
}
if condition1 {
return true
}
Expand Down

0 comments on commit 2d60284

Please sign in to comment.