What I’m trying to do:
Implement an Anvil Uplink that is behind our unauthenticated corporate HTTP proxy.
What I’ve tried and what’s not working:
I am able to establish a connection to the hosted Anvil application using curl behind our corporate HTTP proxy
Code Sample:
>rem configure proxy
>set HTTPS_PROXY=195.233.25.20:8080
>curl -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Sec-WebSocket-Version-Version: 13" -H "Sec-WebSocket-Key: 12345" https://anvil.works/uplink
HTTP/1.1 200 Connection established
Date: Sun, 06 Jun 2021 13:06:30 GMT
Via: 1.1 de1secwebcl
HTTP/1.1 101 Switching Protocols
Server: nginx
Date: Sun, 06 Jun 2021 13:06:30 GMT
Content-Length: 0
Connection: upgrade
Sec-Websocket-Accept: PSe+XWazCRTkoGEE4Sb1pwS2k7k=
Upgrade: websocket
curl: (52) Empty reply from server
but unable to establish the same connection from an Anvil uplink application
Code Sample:
>python anvil_uplink_test.py
Connecting to wss://anvil.works/uplink
Traceback (most recent call last):
File "anvil_uplink.py", line 3, in <module>
anvil.server.connect("REACTED UPLINK LINK")
File "C:\anvil-uplink-test\env\lib\site-packages\anvil\server.py", line 266, in connect
_get_connection()
File "C:\anvil-uplink-test\env\lib\site-packages\anvil\server.py", line 248, in _get_connection
raise e
File "C:\anvil-uplink-test\env\lib\site-packages\anvil\server.py", line 245, in _get_connection
_connection.connect()
File "C:\anvil-uplink-test\env\lib\site-packages\ws4py\client\__init__.py", line 217, in connect
self.sock.connect(self.bind_addr)
File "c:\google\google-cloud-sdk\platform\bundledpython\lib\ssl.py", line 1172, in connect
self._real_connect(addr, False)
File "c:\google\google-cloud-sdk\platform\bundledpython\lib\ssl.py", line 1159, in _real_connect
super().connect(addr)
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
I saw the feature request for Uplink behind an authenticated proxy but wanted to know whether Uplink behind an unauthenticated proxy was supported.