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
curl https://get.acme.sh | sh -s email=blog@chriskirby.net | |
# Source the installed script (or restart your terminal) | |
source ~/.bashrc # or source ~/.zshrc for macOS | |
# Export Cloudflare API Token | |
export CF_Token="your-cloudflare-api-token" | |
# Optional: Add this to your ~/.bashrc or ~/.zshrc to make it permanent | |
# Issue the certificate |
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
image: | |
repository: adguard/adguardhome | |
pullPolicy: IfNotPresent | |
tag: latest | |
env: | |
TZ: America/Detroit | |
# customizing my web and dns services | |
# using the LoadBalancer to expose outside of the cluster |
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
bind_host: 0.0.0.0 | |
bind_port: 3000 | |
# I recommend adding a user account, but this is optional | |
# requires hashed password htpasswd -B -n -b <USERNAME> <PASSWORD> | |
users: | |
- name: admin | |
password: XXXXXXXXXXXXXXXXXXXXXXXX | |
auth_attempts: 5 | |
block_auth_min: 15 | |
http_proxy: "" |
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
import sys | |
import yaml | |
import re | |
from typing import List, Dict, Any | |
class NoAliasDumper(yaml.SafeDumper): | |
"""Custom YAML dumper that ignores aliases.""" | |
def ignore_aliases(self, data): | |
return True |
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
import json | |
import yaml | |
import sys | |
from datetime import datetime | |
import re | |
def clean_comment(comment): | |
"""Clean up comment by removing newlines and extra spaces.""" | |
if not comment: | |
return "" |
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
import json | |
import yaml | |
import sys | |
from datetime import datetime, timezone | |
def convert_adlists(adlists_json): | |
"""Convert Pi-hole adlists to AdGuard Home filters format.""" | |
try: | |
adlists_data = json.loads(adlists_json) | |
except json.JSONDecodeError: |
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
meta { | |
name: GetFirewallRule | |
type: http | |
seq: 3 | |
} | |
get { | |
url: https://{{udm-ip}}/proxy/network/api/s/default/rest/firewallrule/{{rule-id}} | |
body: none | |
auth: none |
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
meta { | |
name: GetTrafficRule | |
type: http | |
seq: 6 | |
} | |
get { | |
url: https://{{udm-ip}}/proxy/network/v2/api/site/default/trafficrule/{{rule-id}} | |
body: none | |
auth: none |
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
meta { | |
name: GetTrafficRules | |
type: http | |
seq: 4 | |
} | |
get { | |
url: https://{{udm-ip}}/proxy/network/v2/api/site/default/trafficrules | |
body: none | |
auth: none |
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
meta { | |
name: GetFirewallRules | |
type: http | |
seq: 3 | |
} | |
get { | |
url: https://{{udm-ip}}/proxy/network/api/s/default/rest/firewallrule | |
body: none | |
auth: none |
NewerOlder