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
  • Loading branch information
Cimbali committed Apr 19, 2023
1 parent 2bf5a4f commit ae4d1f0
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 @@ -178,7 +178,10 @@ func (ctx* nftCtx) nftIfup(ifname string) {
})

element := []nftables.SetElement{
{ Key: net.ParseIP("10.124.0.0").To4() },
{ Key: net.ParseIP("10.125.0.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 @@ -457,6 +460,7 @@ func NetfilterCreateTables() int32 {
Table: mozvpn_ctx.table_inet,
Name: "mozvpn-socks5-relays",
KeyType: nftables.TypeIPAddr,
Interval: true,
}
mozvpn_ctx.conn.AddSet(mozvpn_ctx.relayset, nil)

Expand Down

0 comments on commit ae4d1f0

Please sign in to comment.