-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
Keep PIA port forward updated #224
Comments
#!/bin/bash while true REM Replace these values with your PIA username and password REM Get the current forwarded port from PIA REM Set the new ip:port for rTorrent using XML-RPC REM Print the new port range REM Wait for 30 minutes before checking PIA again |
made some change above, as that curl method was deprecated, also found the answer tomy question about the listening ip:port.....now to test if my method to make xml-rpc calls works |
Any progress on this? |
@potter-jason you might want to remove your PIA details from this... |
I'm not sure this can currently be accomplished with XML-RPC. The I think the only way to do this is to set |
Hi -
I wrote this bash script to grab the forwarded port from PIA's API, then pass it to rtorrent via XML-RPC, the check every 30 minutes if PIA changed the port. I'm passing the port to network.port_range.set. Is this the correct variable to send that to? Is there not an IP address as well for the listening ADDRESS:PORT?
#!/bin/bash
while true
do
Get the current forwarded port from PIA
PIA_PORT=$(curl -s -u "${PIA_USERNAME}:${PIA_PASSWORD}" "http://209.222.18.222:2000/?client_id=${PIA_CLIENT_ID}&token=${PIA_TOKEN}" | jq -r '.port')
Set the new port range for rTorrent using XML-RPC
xmlrpc localhost network.port_range.set ${PIA_PORT} ${PIA_PORT}
Print the new port range
echo "Changed rTorrent port range to ${PIA_PORT}"
Wait for 30 minutes before checking PIA again
sleep 1800
done
The text was updated successfully, but these errors were encountered: