socialwifi / RouterOS-api

Python API to RouterBoard devices produced by MikroTik.
MIT License
251 stars 100 forks source link

Adding proxy socks #87

Open kacem-expereo opened 1 year ago

kacem-expereo commented 1 year ago

Adding proxy socks in the constructor One can add the following parameters to the RouterOSApiPool constructor : proxy_socks_host and proxy_socks_port. API requests are then transmitted via the proxy socks. This can be helpful when one can not directly communicate with the mikrotik routers and must use an intermediate machine.

Example :

connection=routeros_api.RouterOsApiPool(
    "1.1.1.1",
    username='mikrotik',
    password='mikrotikpassword',
    port=8729,
    plaintext_login=True,
    proxy_socks_host="127.0.0.1",
    proxy_socks_port=9090,
)