Skip to content

Commit

Permalink
Update local network routing (#1117)
Browse files Browse the repository at this point in the history
Required:

Task/Issue URL: https://app.asana.com/0/1199230911884351/1208918011157080/f
iOS PR: TODO
macOS PR: TODO
What kind of version bump will this require?: Patch

Optional:

Tech Design URL:
CC:

Description:

This PR updates local network routing. When including local networks, 10.0.0.0/8 will also go through the tunnel.
  • Loading branch information
samsymons authored Dec 6, 2024
1 parent ad28b07 commit a404b05
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion Sources/NetworkProtection/Routing/VPNRoutingRange.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,13 @@ public enum VPNRoutingRange {
"::1/128", /* loopback */
]

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

public static let localNetworkRange: [NetworkProtection.IPAddressRange] = [
// "10.0.0.0/8", /* 255.0.0.0 */
"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 */
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct VPNRoutingTableResolver {
var routes = VPNRoutingRange.alwaysExcludedIPv4Range

if excludeLocalNetworks {
routes += VPNRoutingRange.localNetworkRange
routes += VPNRoutingRange.localNetworkRangeWithoutDNS
}

return routes
Expand Down

0 comments on commit a404b05

Please sign in to comment.