Skip to content

Instantly share code, notes, and snippets.

View nickfox-taterli's full-sized avatar
😰
想哭

Tater Li nickfox-taterli

😰
想哭
View GitHub Profile
@nickfox-taterli
nickfox-taterli / brcm_patchram_plus.c
Created November 26, 2021 08:51
brcm_patchram_plus.c
/*******************************************************************************
*
* 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
*
#!/bin/bash
cd /tmp
# 生成密钥
wg genkey | tee privatekey | wg pubkey > publickey
# 服务器私钥
ServerKey=`cat privatekey`
# 服务器公钥
ServerPub=`cat publickey`
@nickfox-taterli
nickfox-taterli / install_dnsproxy.sh
Last active February 27, 2022 14:36
install_dnsproxy bridge v4/v6 and v6_fist
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
#!/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";
@nickfox-taterli
nickfox-taterli / test.sh
Last active September 30, 2021 09:18
test
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
@nickfox-taterli
nickfox-taterli / main.go
Created September 11, 2021 03:24
PHP+Go采集器
package main
import (
"encoding/json"
"net/http"
"runtime"
"strings"
"syscall"
"time"
@nickfox-taterli
nickfox-taterli / AgentController.php
Created September 11, 2021 03:24
PHP + Go 采集器
<?php
namespace App\Http\Controllers;
use DB;
use Carbon\Carbon;
use Illuminate\Http\Request;
class AgentController extends Controller
{
@nickfox-taterli
nickfox-taterli / config.json
Created September 5, 2021 20:24
Config Json with SOCKS Outbound and IPv6
{
"policy": {},
"log": {
"access": "/var/log/xray/access.log",
"error": "/var/log/xray/error.log",
"loglevel": "debug"
},
"inbounds": [
{
"port": 80,
@nickfox-taterli
nickfox-taterli / InstallTun.sh
Last active January 12, 2024 05:37
InstallTun
#!/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
@nickfox-taterli
nickfox-taterli / dns.py
Created August 26, 2021 04:54
PDNS Pipe
#!/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