-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathwormhole-proof.yml
More file actions
78 lines (67 loc) · 2 KB
/
wormhole-proof.yml
File metadata and controls
78 lines (67 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Wormhole Proof (WebRTC Tunnel)
on:
workflow_dispatch:
inputs:
offer:
description: 'Base64-encoded WebRTC offer from client'
required: true
profile:
description: 'Twitter/X username to prove'
required: true
default: 'socrates1024'
jobs:
prove:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install deps
run: cd wormhole && npm install
- name: Start WebRTC tunnel
env:
OFFER: ${{ inputs.offer }}
run: |
cd wormhole
node runner.js &
RUNNER_PID=$!
echo "RUNNER_PID=$RUNNER_PID" >> $GITHUB_ENV
# Wait for SOCKS5 proxy (up to 3 min for ICE + connection)
for i in {1..90}; do
if nc -z 127.0.0.1 1080 2>/dev/null; then
echo "SOCKS5 proxy ready!"
break
fi
sleep 2
done
# Test tunnel
EXIT_IP=$(curl --socks5 127.0.0.1:1080 -s --max-time 10 https://api.ipify.org || echo "tunnel-not-ready")
echo "Exit IP: $EXIT_IP"
- name: Capture proof
env:
SESSION_JSON: ${{ secrets.TWITTER_SESSION }}
run: |
mkdir -p proof
cd wormhole
node capture.js ${{ inputs.profile }}
- name: Create certificate
run: |
cat > proof/certificate.json << EOF
{
"type": "wormhole-twitter-proof",
"profile": "${{ inputs.profile }}",
"timestamp": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
"github_run_id": "${{ github.run_id }}",
"method": "webrtc-tunnel-via-logs"
}
EOF
- name: Upload proof
uses: actions/upload-artifact@v4
with:
name: wormhole-proof
path: proof/
- name: Cleanup
if: always()
run: kill $RUNNER_PID 2>/dev/null || true