Skip to content

Commit 57c7f62

Browse files
committed
fix: streamline proxy configuration setup in test.yml; remove redundant checks and ensure secret generation
1 parent 671ad4e commit 57c7f62

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,14 @@ jobs:
4242
run: |
4343
mkdir -p mtproxy-run
4444
cp objs/bin/mtproto-proxy mtproxy-run/
45-
cp proxy-multi.conf mtproxy-run/
46-
cp proxy-secret mtproxy-run/
47-
48-
# Generate a secret if not present (though we copied one)
49-
# or just use the one we have
5045
5146
cd mtproxy-run
52-
# Create a startup script wrapper or run directly in background
53-
# using the same command structure as Dockerfile
5447
55-
# Download config/secret if needed (likely already there from repo or build)
56-
if [ ! -f proxy-secret ]; then curl -s https://core.telegram.org/getProxySecret -o proxy-secret; fi
57-
if [ ! -f proxy-multi.conf ]; then curl -s https://core.telegram.org/getProxyConfig -o proxy-multi.conf; fi
48+
# Download config/secret
49+
curl -s https://core.telegram.org/getProxySecret -o proxy-secret
50+
curl -s https://core.telegram.org/getProxyConfig -o proxy-multi.conf
5851
59-
# Generate a random secret for testing if not provided
52+
# Generate a random secret for testing
6053
SECRET=$(hexdump -n 16 -e '4/4 "%08x" 1 "\n"' /dev/urandom)
6154
echo "Using secret: $SECRET"
6255

0 commit comments

Comments
 (0)