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
#!/bin/bash | |
# 动态更新指定wg接口对端IP | |
# debug=1 | |
# 配置 | |
interfaceName="wg0" # wg 命令中的端口名称 | |
# 对端配置 | |
publicKey="123456=" # 对端公钥 | |
domains=( | |
"example.org" | |
"example.com" |
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
$config = [PSCustomObject]@{ | |
interfaceName = "wg0" # wg 命令中的端口名称 | |
endPoint = [PSCustomObject]@{ | |
publicKey = "123456=" # 对端公钥 | |
domains = @( | |
"example.org", | |
"example.com") # 对端域名 可有多个 | |
type = "A" # 或者AAAA | |
sshPort = "22" | |
sshPublicKey = "123456" # sha256 |
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
#!/bin/bash | |
function curlProxy() { | |
if [[ -z $apiEndpoint || -z $apiAuthorization ]]; then | |
return 1 | |
fi | |
curlPara=("$@") | |
originalUrl=${curlPara[-1]} |
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
#!/bin/bash | |
## doh.sh name type | |
endPoint='example.org' | |
name=${1}; type=${2}; | |
if [[ -z ${name} ]]; then | |
name=example.org | |
fi |
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
#!/bin/bash | |
# debug=1 | |
tokens="" # dynv6 HTTP token | |
apiEndpoint='dynv6.com' | |
apiRootPath='/api/v2' | |
historyFile=".iphistory_dynv6" # history file |
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/bash | |
#Author StefanAbl | |
#Usage specify a private keyfile to use with dynv6 'export KEY="path/to/keyfile"' | |
#or use the HTTP REST API by by specifying a token 'export DYNV6_TOKEN="value" | |
#if no keyfile is specified, you will be asked if you want to create one in /home/$USER/.ssh/dynv6 and /home/$USER/.ssh/dynv6.pub | |
dynv6_api="https://dynv6.com/api/v2" | |
# export CFWORK_ENDPOINT='value' | |
# export CFWORK_AUTHORIZATION='' |
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
#------------------------------------------------------------------------------ | |
# custom notifications | |
# | |
# enable/disable sending custom notifications | |
SEND_CUSTOM="YES" | |
# if a role's recipients are not configured, use the following. | |
# (empty = do not send a notification for unconfigured roles) | |
DEFAULT_RECIPIENT_CUSTOM="sysadmin" |
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
// Var apiAuthorization as key | |
// Header apihost | |
// Header apiAuthorization as key | |
addEventListener('fetch', event => { | |
event.respondWith(handleRequest(event.request)) | |
}) | |
const defaultPage = '<!DOCTYPE html><html><head><title>Welcome to nginx!</title><style>body{width:35em;margin:0 auto;font-family:Tahoma,Verdana,Arial,sans-serif}</style></head><body><h1>Welcome to nginx!</h1><p>If you see this page,the nginx web server is successfully installed and working.Further configuration is required.</p><p>For online documentation and support please refer to<a href="http://nginx.org/">nginx.org</a>.<br/>Commercial support is available at<a href="http://nginx.com/">nginx.com</a>.</p><p><em>Thank you for using nginx.</em></p></body></html>'; |
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/bash | |
#Support Telegram Bots | |
#Modify for CF Worker | |
# export TELEGRAM_CFWORK_BOT_APITOKEN TELEGRAM_CFWORK_BOT_CHATID CFWORK_ENDPOINT CFWORK_AUTHORIZATION | |
#TELEGRAM_CFWORK_BOT_APITOKEN="" | |
#TELEGRAM_CFWORK_BOT_CHATID="" | |
#CFWORK_ENDPOINT="" |
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
#!/bin/bash | |
ip='192.168.1.1' | |
username='admin' | |
password='123456789' | |
# curl -w "\nCode:%{response_code}\n" "http://${ip}" # 获取登录状态 | |
# curl 'http://192.168.1.1/logon.cgi' --data-raw 'username=admin&password=123456789&logon=%E7%99%BB%E5%BD%95' # 登录 |
NewerOlder