Skip to content

Commit

Permalink
On mobile entry ip is set on tun
Browse files Browse the repository at this point in the history
  • Loading branch information
pronebird committed Oct 29, 2024
1 parent 8ebb488 commit 6632607
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,18 @@ const DEFAULT_TUN_MTU: u16 = if cfg!(any(target_os = "ios", target_os = "android
} else {
1500
};

#[cfg(any(target_os = "linux", target_os = "macos"))]
/// Entry IPv6 address (ULA) used by WireGuard, currently not routable.
const WG_ENTRY_IPV6_ADDR: Ipv6Addr = Ipv6Addr::new(
0xfdcc, 0x9fc0, 0xe75a, 0x53c3, 0xfa25, 0x241f, 0x21c0, 0x70d0,
);

#[cfg(any(
target_os = "linux",
target_os = "macos",
target_os = "android",
target_os = "ios"
))]
/// Entry IPv6 address (ULA) used by WireGuard, currently not routable.
const WG_ENTRY_IPV6_ADDR: Ipv6Addr = Ipv6Addr::new(
0xfdcc, 0x9fc0, 0xe75a, 0x53c3, 0xfa25, 0x241f, 0x21c0, 0x70d0,
);

#[cfg(any(target_os = "linux", target_os = "macos"))]
/// Exit IPv6 address (ULA) used by WireGuard, currently not routable.
const WG_EXIT_IPV6_ADDR: Ipv6Addr = Ipv6Addr::new(
0xfdcc, 0x9fc0, 0xe75a, 0x53c3, 0x72a5, 0xf352, 0x5475, 0x4160,
Expand Down Expand Up @@ -399,7 +398,7 @@ impl ConnectingState {
.expect("ipv4 to ipnetwork/32"),
),
IpNetwork::V6(
Ipv6Network::new(WG_EXIT_IPV6_ADDR, 128).expect("ipv6 to ipnetwork/128"),
Ipv6Network::new(WG_ENTRY_IPV6_ADDR, 128).expect("ipv6 to ipnetwork/128"),
),
],
remote_addresses: vec![conn_data.entry.endpoint.ip()],
Expand Down

0 comments on commit 6632607

Please sign in to comment.