-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (32 loc) · 1 KB
/
netaccess.yml
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
name: Test Network Access
on:
workflow_dispatch:
jobs:
test_network_access:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: |
3.6.7
- name: Setup Proxy
run: |
pip install proxybroker
proxybroker serve --host 127.0.0.1 --port 8888 --types HTTP HTTPS --lvl High --countries IN
- name: Setup env proxy
run: |
export HTTP_PROXY="http://127.0.0.1:8080"; export HTTPS_PROXY="http://127.0.0.1:8080"
- name: Test Network Access
run: |
# Replace 'https://example.com' with the URL you want to test
response=$(curl -s api.ipify.org
# Check if the request was successful (HTTP status code 200)
if [ $? -eq 0 ]; then
echo "Network access successful! Response:"
echo "$response"
else
echo "Failed to access the network."
fi