mirror of
https://github.com/vvbbnn00/WARP-Clash-API.git
synced 2026-06-12 21:02:18 +08:00
This update allows the IP proxy pool address to be configured for obtaining WARP+ traffic. This is achieved by adding a PROXY_POOL_URL environment variable. Dockerfile has also been updated to change the Alpine source and add new dependencies. Scripts have been modified to accommodate these changes.
15 lines
316 B
Python
15 lines
316 B
Python
import requests
|
|
|
|
from config import PROXY_POOL_URL
|
|
|
|
|
|
def getProxy():
|
|
ret = requests.get(PROXY_POOL_URL).json()
|
|
proxy = {}
|
|
if ret.get('proxy'):
|
|
if ret['https']:
|
|
proxy = {"https": {ret['proxy']}}
|
|
else:
|
|
proxy = {"http": {ret['proxy']}}
|
|
return proxy
|