Skip to content

Commit

Permalink
Route 10.0.0.0/8 through the tunnel when including local networks.
Browse files Browse the repository at this point in the history
  • Loading branch information
samsymons committed Dec 6, 2024
1 parent e5d390c commit 9ec2896
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Sources/NetworkProtection/Routing/VPNRoutingRange.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ public enum VPNRoutingRange {
"192.168.0.0/16", /* 255.255.0.0 */
]

public static let localNetworkRangeWithDNS: [NetworkProtection.IPAddressRange] = [
"10.0.0.0/8", /* 255.0.0.0 */
"172.16.0.0/12", /* 255.240.0.0 */
"192.168.0.0/16", /* 255.255.0.0 */
]

public static let publicNetworkRange: [NetworkProtection.IPAddressRange] = [
"1.0.0.0/8",
"2.0.0.0/8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ struct VPNRoutingTableResolver {
var routes = VPNRoutingRange.publicNetworkRange + dnsRoutes()

if !excludeLocalNetworks {
routes += VPNRoutingRange.localNetworkRange
routes += VPNRoutingRange.localNetworkRangeWithDNS
}

return routes
Expand Down

0 comments on commit 9ec2896

Please sign in to comment.