Skip to content

Update tor exit_addresses + or_addresses #1051

Update tor exit_addresses + or_addresses

Update tor exit_addresses + or_addresses #1051

Workflow file for this run

name: Update tor exit_addresses + or_addresses
on:
push:
branches:
- master
schedule:
- cron: "00 0,6,12,18 * * *"
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@master
with:
fetch-depth: 1
- name: Get IPv4 exit_addresses + or_addresses, delete ports and sort-unique output
run: |
tor_ipv4=$(curl -s 'https://onionoo.torproject.org/details?flag=Exit&fields=exit_addresses,or_addresses' 2>/dev/null \
| grep -Po '[[,]"\K[^"]*' | grep -v 'or_addresses\|exit_addresses' | sed "s/:[0-9]*$//g" \
| grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | sort -Vu); \
if [ $(echo "${tor_ipv4}" | grep -coE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b") -ge 1000 ]; then \
echo "${tor_ipv4}" > exits-ipv4.txt;fi #update file only if there are enough ipv4 found
- name: Get IPv6 exit_addresses + or_addresses, delete ports and sort-unique output
run: |
tor_ipv6=$(curl -s 'https://onionoo.torproject.org/details?flag=Exit&fields=exit_addresses,or_addresses' 2>/dev/null \
| grep -Po '[[,]"\K[^"]*' | grep -v 'or_addresses\|exit_addresses' | sed "s/:[0-9]*$//g" \
| grep -oE "\b([a-f0-9:]+:+)+[a-f0-9]+\b" | sort -Vu);
if [ $(echo "${tor_ipv6}" | grep -coE "\b([a-f0-9:]+:+)+[a-f0-9]+\b") -ge 500 ]; then \
echo "${tor_ipv6}" > exits-ipv6.txt;fi #update file only if there are enough ipv6 found
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d - %H:%M:%S')"
- name: Upload Stuff to GitHub via https://github.com/stefanzweifel/git-auto-commit-action
uses: stefanzweifel/git-auto-commit-action@v4
with:
file_pattern: '*.txt'
disable_globbing: true
commit_message: Update TOR Lists - ${{ steps.date.outputs.date }}