transparent-proxy / startup.sh
wangwei0's picture
Update startup.sh
3a7b96f verified
raw
history blame contribute delete
No virus
528 Bytes
#!/bin/bash
# a little trick to avoid getting stuck on Starting
python -m http.server 7860 & kill $!
python space_checker.py &
TARGET_URL=$TARGET_URL
cat << EOF
This is a transparent proxy server.
TARGET_URL should be the endpoint of the API you are accessing, similar to [https://api.cohere.com].
SPACE_URL is the direct domain of your Space, similar to [username-space-name.hf.space]。
To confirm, you MUST set the Space to public and then click [...] - [Embed this Space].
EOF
./glider -listen :7860 -forward $TARGET_URL