@@ -152,7 +152,11 @@ async def __aexit__(self) -> None:
152152    async  def  start (self , host : str  =  "127.0.0.1" , port : int  =  8080 ) ->  None :
153153        await  self .state_store .open ()
154154        self .log .debug (f"Starting appservice web server on { host } { port }  )
155-         if  self .server .startswith ("https://" ) and  not  self .verify_ssl :
155+         if  self .server .startswith ("unix://" ):
156+             path  =  self .server .replace ('unix://' , '' )
157+             self .server  =  'http://localhost' 
158+             connector  =  aiohttp .UnixConnector (limit = self .connection_limit , path = path )
159+         elif  self .server .startswith ("https://" ) and  not  self .verify_ssl :
156160            connector  =  aiohttp .TCPConnector (limit = self .connection_limit , verify_ssl = False )
157161        else :
158162            connector  =  aiohttp .TCPConnector (limit = self .connection_limit )
@@ -176,7 +180,10 @@ async def start(self, host: str = "127.0.0.1", port: int = 8080) -> None:
176180            ssl_ctx .load_cert_chain (self .tls_cert , self .tls_key )
177181        self .runner  =  web .AppRunner (self .app )
178182        await  self .runner .setup ()
179-         site  =  web .TCPSite (self .runner , host , port , ssl_context = ssl_ctx )
183+         if  host .startswith ("/" ):
184+             site  =  web .UnixSite (self .runner , host )
185+         else :
186+             site  =  web .TCPSite (self .runner , host , port , ssl_context = ssl_ctx )
180187        await  site .start ()
181188
182189    async  def  stop (self ) ->  None :
0 commit comments