mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-04 14:31:13 +02:00
Add symbol dimensions endpoint and SSL support for packet capture with remote HTTPS server.
This commit is contained in:
1 parent
802959f9ab
commit
fa4c9a91ca
3 files changed
+32
-8
No files matched your search
@@ -30,9 +30,10 @@ class HTTPClient:
|
||||
_aiohttp_client: aiohttp.ClientSession = None
|
||||
|
||||
@classmethod
|
||||
def get_client(cls) -> aiohttp.ClientSession:
|
||||
def get_client(cls, ssl_context=None) -> aiohttp.ClientSession:
|
||||
if cls._aiohttp_client is None:
|
||||
cls._aiohttp_client = aiohttp.ClientSession(connector=aiohttp.TCPConnector(family=socket.AF_INET))
|
||||
connector = aiohttp.TCPConnector(family=socket.AF_INET, ssl_context=ssl_context)
|
||||
cls._aiohttp_client = aiohttp.ClientSession(connector=connector)
|
||||
return cls._aiohttp_client
|
||||
|
||||
@classmethod
|
||||
@@ -42,9 +43,9 @@ class HTTPClient:
|
||||
cls._aiohttp_client = None
|
||||
|
||||
@classmethod
|
||||
def request(cls, method: str, url: str, user: str = None, password: str = None, **kwargs):
|
||||
def request(cls, method: str, url: str, user: str = None, password: str = None, ssl_context=None, **kwargs):
|
||||
|
||||
client = cls.get_client()
|
||||
client = cls.get_client(ssl_context=ssl_context)
|
||||
basic_auth = None
|
||||
if user:
|
||||
if not password:
|
||||
|
||||
Reference in new issue
Block a user