akshaymane920 / pyFortimanagerAPI

A wrapper for FortiManager API
https://akshaymane920.github.io/pyFortimanagerAPI/
MIT License
31 stars 34 forks source link

Alternative parameters: port #32

Open zetto33 opened 1 year ago

zetto33 commented 1 year ago

Hi, first of all thank you a lot to share this excellent lib. I would like to make a request. Is that possible to add a feature to connect into an alternative port?

According to docs it accepts as alternative parameters: adom, protocol (http=80/https=443), verify, and proxies.

I have just modified port_by_scheme = {"http": 80, "https": 8443} into file ./site-packages/urllib3/connection.py to accept an alternative port.

Once again, thank you!


Edited please, never mind.. fortimngr = pyFortiManagerAPI.FortiManager(host="1.2.3.4:8443", username="someuser", password="somepass", verify=False)

christopheguengant commented 3 months ago

Hello,

thanks for your post, i was struggling with this.