This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Settings | |
WG_IFACE=wg0 | |
WG_PEER=<peer_id> | |
WG_PORT=12345 | |
HOSTNAME=yourhostname.dynamicip.example.com | |
# File to store the last IP | |
last_ip_file="/tmp/last_ip.txt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import pycoin.key | |
import sys | |
import requests | |
import json | |
import datetime | |
def getbalance(address): | |
response = requests.get("https://bitaps.com/api/address/%s" % address) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:global previousIP 1.2.3.4 | |
:global ipAddressCheckURL "http://ifconfig.me/ip" | |
# or... :global ipAddressCheckURL "http://icanhazip.com" | |
:global ipChangedEventURL "https://webhook.site/12345678-9610-4f57-9bfe-a3c5e2551d26" | |
/system/script/add name=reportDynamicIPChanged source={ | |
:global ipAddressCheckURL | |
:global ipChangedEventURL | |
:local result [/tool fetch url=$ipAddressCheckURL mode=http as-value output=user]; | |
:if ($result->"status" = "finished") do={ | |
:local currentIP ($result->"data"); |
OlderNewer