Skip to content

Instantly share code, notes, and snippets.

View hyqhyq3's full-sized avatar

hyqhyq_3 hyqhyq3

  • moonton
  • Shanghai China
View GitHub Profile
@catchdave
catchdave / replace_synology_ssl_certs.sh
Last active February 22, 2025 22:41
CLI script to programmatically replace SSL certs on Synology NAS
# MOVED to public repo: https://github.com/catchdave/ssl-certs/blob/main/replace_synology_ssl_certs.sh
ipset -N gfwlist iphash
#Telegram
ipset add gfwlist 91.108.56.0/22
ipset add gfwlist 91.108.4.0/22
ipset add gfwlist 109.239.140.0/24
ipset add gfwlist 149.154.160.0/20
#iptables
iptables -t nat -A prerouting_lan_rule -p tcp -m set --match-set gfwlist dst -j REDIRECT --to-port 1080
// Copyright 2006 Nemanja Trifunovic
// Copyright 2011 Jack.arain
/*
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following: