Skip to content

Commit

Permalink
Add range of IP addresses for socks relays (exit nodes)
Browse files Browse the repository at this point in the history
Use 10.124.0.0/20 as documented in the code
  • Loading branch information
Cimbali committed Nov 11, 2024
1 parent 220e06f commit 8d8d07b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions linux/netfilter/netfilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,10 @@ func (ctx *nftCtx) nftRestrictTraffic(ifname string) {
})

element := []nftables.SetElement{
{ Key: net.ParseIP("10.124.0.0").To4() },
{ Key: net.ParseIP("10.124.240.0").To4(), IntervalEnd: true },
{ Key: net.ParseIP("10.64.0.1").To4() },
{ Key: net.ParseIP("10.64.0.2").To4(), IntervalEnd: true },
}
mozvpn_ctx.conn.SetAddElements(mozvpn_ctx.relayset, element)
}
Expand Down Expand Up @@ -693,6 +696,7 @@ func NetfilterCreateTables() int32 {
Table: mozvpn_ctx.table,
Name: "mozvpn-socks5-relays",
KeyType: nftables.TypeIPAddr,
Interval: true,
}
mozvpn_ctx.conn.AddSet(mozvpn_ctx.relayset, nil)

Expand Down

0 comments on commit 8d8d07b

Please sign in to comment.