I has been trying to create a port forwarding session including a dynamic socks with paramiko and pysocks, I already do it with plink using this:
plink -ssh -D 10100 -L 25000:PrivateServerIP:1494 user@RemoteServerIP
I am trying this but isn't working:
import paramiko
from getpass import getpass
import socks
USERNAME= 'username'
SERVER_IP = '138.x.x.x'
PRIVATE_IP = '10.x.x.x'
OTP = getpass()
def main():
    client = paramiko.SSHClient()
    client.load_system_host_keys()
    client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
    client.connect(hostname=SERVER_IP, username=signum, password=OTP)
    trans = client.get_transport()
    trans.open_channel("forwarded-tcpip", dest_addr = (PRIVATE_IP, 1494), src_addr = ('', 25000))
    
    s = socks.socksocket() 
    s.set_proxy(socks.SOCKS5, "",10100)
				
                        
I run plink command in background using subprocess and QNetworkProxy for my app: