Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
hulthe committed Dec 13, 2024
1 parent a579f49 commit 819a46b
Showing 1 changed file with 13 additions and 24 deletions.
37 changes: 13 additions & 24 deletions talpid-core/src/firewall/macos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,30 +323,19 @@ impl Firewall {
}

// no nat to [vpn ip]
//let no_nat_to_vpn_server = pfctl::NatRuleBuilder::default()
// .action(pfctl::NatRuleAction::NoNat)
// .to(peer_endpoint.endpoint.address)
// .user(Uid::from(0))
// .build()?;
//rules.push(no_nat_to_vpn_server);

//for ip in &tunnel.ips {
// rules.push(
// pfctl::NatRuleBuilder::default()
// .action(pfctl::NatRuleAction::Nat {
// nat_to: pfctl::NatEndpoint::from(pfctl::Ip::from(*ip)),
// })
// .to(peer_endpoint.endpoint.address.ip())
// .build()?,
// );
//}

//// no nat on [tun interface]
//let no_nat_on_tun = pfctl::NatRuleBuilder::default()
// .action(pfctl::NatRuleAction::NoNat)
// .interface(&tunnel.interface)
// .build()?;
//rules.push(no_nat_on_tun);
let no_nat_to_vpn_server = pfctl::NatRuleBuilder::default()
.action(pfctl::NatRuleAction::NoNat)
.to(peer_endpoint.endpoint.address)
.user(Uid::from(0))
.build()?;
rules.push(no_nat_to_vpn_server);

// no nat on [tun interface]
let no_nat_on_tun = pfctl::NatRuleBuilder::default()
.action(pfctl::NatRuleAction::NoNat)
.interface(&tunnel.interface)
.build()?;
rules.push(no_nat_on_tun);

// Masquerade other traffic via VPN utun
for ip in &tunnel.ips {
Expand Down

0 comments on commit 819a46b

Please sign in to comment.