Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add port forwarding with PIA using --port-forwarding #245

Merged
merged 11 commits into from
Jan 20, 2024
Prev Previous commit
Next Next commit
Fix style.
  • Loading branch information
BenLand100 committed Jan 13, 2024
commit 40c4594f1d314bdcdaf45c5bfcd3f5ecbc5aa1c8
4 changes: 2 additions & 2 deletions vopono_core/src/network/piapf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ impl Piapf {
}
let re = Regex::new(r" *1 *(?P<gateway>\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}).*").unwrap();
BenLand100 marked this conversation as resolved.
Show resolved Hide resolved
let result = String::from_utf8_lossy(&traceroute_response.stdout);
let second_line = result.lines().skip(1).next().unwrap();
let vpn_gateway = re.captures(&second_line).unwrap().get(1).unwrap().as_str().to_string();
let second_line = result.lines().nth(1).unwrap();
let vpn_gateway = re.captures(second_line).unwrap().get(1).unwrap().as_str().to_string();

log::info!("PIA gateway: {}", vpn_gateway);

Expand Down