Skip to content

Commit

Permalink
adds api.pinata vsock
Browse files Browse the repository at this point in the history
  • Loading branch information
KasparPeterson committed Apr 3, 2024
1 parent 9b0cdfa commit 5108d17
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions enclave/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ echo "127.0.0.1 oauth2.googleapis.com" >> /etc/hosts
echo "127.0.0.1 exec.bearly.ai" >> /etc/hosts
echo "127.0.0.1 api.groq.com" >> /etc/hosts
echo "127.0.0.1 galadriel.mypinata.cloud" >> /etc/hosts
echo "127.0.0.1 api.pinata.cloud" >> /etc/hosts

python3.10 /app/traffic_forwarder.py 127.0.0.1 443 &

Expand Down
4 changes: 3 additions & 1 deletion enclave/run_proxies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ nohup vsock-proxy 8007 exec.bearly.ai 443 \
nohup vsock-proxy 8008 api.groq.com 443 \
--config vsock/vsock_proxy_groq.yaml &> vsock_proxy_groq.log &
nohup vsock-proxy 8009 galadriel.mypinata.cloud 443 \
--config vsock/vsock_proxy_ipfs.yaml &> vsock_proxy_ipfs.log &
--config vsock/vsock_proxy_ipfs.yaml &> vsock_proxy_ipfs.log &
nohup vsock-proxy 8010 api.pinata.cloud 443 \
--config vsock/vsock_proxy_pinata.yaml &> vsock_proxy_pinata.log &
2 changes: 2 additions & 0 deletions enclave/traffic_forwarder.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
REMOTE_PORT_BEARLY = 8007
REMOTE_PORT_GROQ = 8008
REMOTE_PORT_IPFS = 8009
REMOTE_PORT_PINATA = 8010

REMOTE_PORTS = {
"api.openai.com": REMOTE_PORT_OPENAI,
Expand All @@ -26,6 +27,7 @@
"exec.bearly.ai": REMOTE_PORT_BEARLY,
"api.groq.com": REMOTE_PORT_GROQ,
"galadriel.mypinata.cloud": REMOTE_PORT_IPFS,
"api.pinata.cloud": REMOTE_PORT_PINATA,
}


Expand Down
2 changes: 2 additions & 0 deletions enclave/vsock/vsock_proxy_pinata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
allowlist:
- { address: api.pinata.cloud, port: 443 }

0 comments on commit 5108d17

Please sign in to comment.