This file contains hidden or 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
/******************************************************************************* | |
* | |
* Copyright (C) 2009-2011 Broadcom Corporation | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
This file contains hidden or 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 | |
cd /tmp | |
# 生成密钥 | |
wg genkey | tee privatekey | wg pubkey > publickey | |
# 服务器私钥 | |
ServerKey=`cat privatekey` | |
# 服务器公钥 | |
ServerPub=`cat publickey` |
This file contains hidden or 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
get_ip(){ | |
local IP=$( ip addr | egrep -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | egrep -v "^192\.168|^172\.1[6-9]\.|^172\.2[0-9]\.|^172\.3[0-2]\.|^10\.|^127\.|^255\.|^0\." | head -n 1 ) | |
[ -z ${IP} ] && IP=$( wget -qO- -t1 -T2 ipv4.icanhazip.com ) | |
[ -z ${IP} ] && IP=$( wget -qO- -t1 -T2 ipinfo.io/ip ) | |
echo ${IP} | |
} | |
install_dnsproxy(){ | |
apt -y install dnsmasq wget git autotools-dev cdbs debhelper dh-autoreconf dpkg-dev gettext libev-dev libpcre3-dev libudns-dev pkg-config fakeroot devscripts sniproxy |
This file contains hidden or 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 | |
Font_Black="\033[30m"; | |
Font_Red="\033[31m"; | |
Font_Green="\033[32m"; | |
Font_Yellow="\033[33m"; | |
Font_Blue="\033[34m"; | |
Font_Purple="\033[35m"; | |
Font_SkyBlue="\033[36m"; | |
Font_White="\033[37m"; |
This file contains hidden or 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
userdel -r admin | |
apt install smokeping | |
cat >/etc/systemd/system/smokeping.service <<EOF | |
[Unit] | |
Description=Smokeping Service, Network Latency Graphical Viewer | |
After=network.service | |
[Service] | |
Type=forking |
This file contains hidden or 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
package main | |
import ( | |
"encoding/json" | |
"net/http" | |
"runtime" | |
"strings" | |
"syscall" | |
"time" |
This file contains hidden or 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
<?php | |
namespace App\Http\Controllers; | |
use DB; | |
use Carbon\Carbon; | |
use Illuminate\Http\Request; | |
class AgentController extends Controller | |
{ |
This file contains hidden or 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
{ | |
"policy": {}, | |
"log": { | |
"access": "/var/log/xray/access.log", | |
"error": "/var/log/xray/error.log", | |
"loglevel": "debug" | |
}, | |
"inbounds": [ | |
{ | |
"port": 80, |
This file contains hidden or 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 | |
# descr:TaterLi自创,用于配置自己的隧道的快捷工具,服务器部分,根据客户端参数来写. | |
# 使用方法 ./InstallTun.sh 0 1.1.1.1 | |
# 使用方法 ./InstallTun.sh [隧道ID] [IP地址] | |
cat >/etc/network/interfaces.d/tun$1 <<EOF | |
auto tun$1 | |
iface tun$1 inet6 v4tunnel | |
address 2a0e:aa07:e024:$(printf %x $((2*$1+1)))::2 |
This file contains hidden or 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/python3 -u | |
# Implementation of a Pipe Backend for PowerDNS | |
# https://doc.powerdns.com/md/authoritative/backend-pipe/ | |
# We need Python unbuffered so we use -u | |
# Another ways to achieve it in | |
# http://stackoverflow.com/questions/107705/disable-output-buffering | |
import sys |