Skip to content

Commit

Permalink
chore: cleanup to have both examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kmherrmann committed Aug 9, 2023
1 parent f7b4897 commit 5cacef1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 104 deletions.
6 changes: 4 additions & 2 deletions ory-actions/vpncheck-py/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Ory Action to check IP addresses against vpnapi.io

This is an example Action (webhook) to check client IP addresses against
vpnapi.com and block requests
security services like focsec.com, vpnapi.com and ipqs.com and block requests

- coming from TOR clients
- coming from known VPNs
Expand Down Expand Up @@ -34,14 +34,15 @@ pip3 install google-cloud-logging
```bash
export BEARER_TOKEN=SOME_SECRET_API_KEY_FOR_YOUR_WEBHOOK;
export VPNAPIIO_API_KEY=YOUR_VPNAPI_KEY;
export FOCSEC_API_KEY=YOUR_FOCSEC_KEY;
python3 main.py
```

### Run locally

```bash
cd ory-actions/vpncheck-py
python3 main.py
python3 focsec.py # or vpnapi.py
```

#### Send a sample request
Expand Down Expand Up @@ -69,6 +70,7 @@ After setting up your GCP project (see, for example,
you can deploy the Action as a cloud function:

```bash
cp focsec.py main.py # Cloud functions like a main.py
gcloud functions deploy vpncheck --runtime python39 --trigger-http --allow-unauthenticated --set-env-vars BEARER_TOKEN=$SOME_SECRET_API_KEY_FOR_YOUR_WEBHOOK,VPNAPIIO_API_KEY=$VPNAPIIO_API_KEY,ENABLE_CLOUD_LOGGING=true --source=.
```

Expand Down
102 changes: 0 additions & 102 deletions ory-actions/vpncheck-py/main.py

This file was deleted.

0 comments on commit 5cacef1

Please sign in to comment.