File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 5959 echo "Using secret: $SECRET"
6060
6161 # Start proxy in background
62- ./mtproto-proxy -u nobody -p 8888 -H 443 -S $SECRET --http-stats --aes-pwd proxy-secret proxy-multi.conf -M 1 &
62+ # Use port 8443 instead of 443 to avoid permission issues or conflicts on the runner
63+ ./mtproto-proxy -u nobody -p 8888 -H 8443 -S $SECRET --http-stats --aes-pwd proxy-secret proxy-multi.conf -M 1 &
6364
6465 # Export SECRET for the test step
6566 echo "MTPROXY_SECRET=$SECRET" >> $GITHUB_ENV
7778 # We need to tell the test script to connect to localhost since we are not in docker-compose
7879 # We can do this by setting an env var or modifying the script to fallback to localhost
7980 export MTPROXY_HOST=localhost
81+ export MTPROXY_PORT=8443
8082 python3 tests/test_proxy.py
8183
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ def test_http_stats():
3535def test_mtproto_port ():
3636 print ("Testing MTProto port..." )
3737 host = os .environ .get ("MTPROXY_HOST" , "mtproxy" )
38- port = 443
38+ port = int ( os . environ . get ( "MTPROXY_PORT" , 443 ))
3939 try :
4040 ip = socket .gethostbyname (host )
4141 print (f"Connecting to { ip } :{ port } " )
@@ -65,6 +65,7 @@ async def test_telethon():
6565 print (f"Connecting to proxy with secret: { secret } " )
6666
6767 host = os .environ .get ("MTPROXY_HOST" , "mtproxy" )
68+ port = int (os .environ .get ("MTPROXY_PORT" , 443 ))
6869
6970 try :
7071 # Use MemorySession since we don't need to persist session
@@ -76,7 +77,7 @@ async def test_telethon():
7677 int (api_id ),
7778 api_hash ,
7879 connection = ConnectionTcpMTProxyIntermediate ,
79- proxy = (host , 443 , secret )
80+ proxy = (host , port , secret )
8081 )
8182
8283 print ("Connecting to Telegram via Proxy..." )
You can’t perform that action at this time.
0 commit comments