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
package main | |
import ( | |
"encoding/json" | |
"net/http" | |
"runtime" | |
"strings" | |
"syscall" | |
"time" |
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
<?php | |
namespace App\Http\Controllers; | |
use DB; | |
use Carbon\Carbon; | |
use Illuminate\Http\Request; | |
class AgentController extends Controller | |
{ |
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
{ | |
"policy": {}, | |
"log": { | |
"access": "/var/log/xray/access.log", | |
"error": "/var/log/xray/error.log", | |
"loglevel": "debug" | |
}, | |
"inbounds": [ | |
{ | |
"port": 80, |
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 | |
# 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 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 |
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 | |
shell_version="1.3.1"; | |
UA_Browser="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36"; | |
UA_Dalvik="Dalvik/2.1.0 (Linux; U; Android 9; ALP-AL00 Build/HUAWEIALP-AL00)"; | |
Font_Black="\033[30m"; | |
Font_Red="\033[31m"; | |
Font_Green="\033[32m"; | |
Font_Yellow="\033[33m"; | |
Font_Blue="\033[34m"; | |
Font_Purple="\033[35m"; |
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
iptables -t nat -A POSTROUTING -s '10.168.0.0/24' -o enp1s0f0 -j MASQUERADE | |
iptables -t nat -A POSTROUTING -o enp1s0f0 -j SNAT --to 162.248.4.28 | |
iptables -t nat -A PREROUTING -i enp1s0f0 -p tcp -m tcp --dport 10200 -j DNAT --to-destination 10.168.0.1:22 | |
iptables -t nat -A PREROUTING -i enp1s0f0 -p tcp -m tcp --dport 10201:10399 -j DNAT --to-destination 10.168.0.1 | |
iptables -t nat -A PREROUTING -i enp1s0f0 -p udp -m udp --dport 10201:10399 -j DNAT --to-destination 10.168.0.1 | |
iptables -t nat -A PREROUTING -i enp1s0f0 -p tcp -m tcp --dport 10400 -j DNAT --to-destination 10.168.0.2:22 | |
iptables -t nat -A PREROUTING -i enp1s0f0 -p tcp -m tcp --dport 10401:10599 -j DNAT --to-destination 10.168.0.2 | |
iptables -t nat -A PREROUTING -i enp1s0f0 -p udp -m udp --dport 10401:10599 -j DNAT --to-destination 10.168.0.2 |
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
/* USER CODE BEGIN Header */ | |
/** | |
****************************************************************************** | |
* @file : main.c | |
* @brief : Main program body | |
****************************************************************************** | |
* @attention | |
* | |
* <h2><center>© Copyright (c) 2021 STMicroelectronics. | |
* All rights reserved.</center></h2> |
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
apt update | |
DEBIAN_FRONTEND=noninteractive apt upgrade --no-install-recommends -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" | |
DEBIAN_FRONTEND=noninteractive apt install curl --no-install-recommends -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" | |
curl -fsSL https://get.docker.com | bash -s docker | |
# fallocate -l 1G /var/swap | |
# mkswap /var/swap | |
# chmod 0600 /var/swap | |
# swapon /var/swap |
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
#include <string.h> | |
#include <stdlib.h> | |
#include "freertos/FreeRTOS.h" | |
#include "freertos/task.h" | |
#include "esp_system.h" | |
#include "esp_log.h" | |
#include "esp_netif.h" | |
#include "esp_event.h" | |
#include "protocol_examples_common.h" |