since I use deluge behind a vpn I need to ask for portforwarding to my vpn provider in order to be able to receive incoming connections.
The problem is that the vpn provider gives me a different port every time I turn on the computer, therefore I am trying to create a script that:
- takes the port number as an input
- parse deluge config files to see its current incoming ports
- change to the new one if it is different
I tried using the json module in python but apparently it cannot read core.conf because of the initial lines
Code: Select all
{
"file": 1,
"format": 1
}
Thanks.