Skip to content

Instantly share code, notes, and snippets.

@darren
darren / rtp_http.go
Last active May 7, 2024 06:59
最简单的Go代码实现联通的iptv转换为HTTP流, 实现类似udpxy的功能
package main
import (
"flag"
"io"
"log"
"net"
"net/http"
"os"
"strings"
@Anime4000
Anime4000 / advanced_conf-telnet.md
Last active February 17, 2024 06:09
XPON SFP ONU (V2801F), XPON STICK ONU (TWCGPON657), RTL8672, RTL9601C1
@jkjuopperi
jkjuopperi / gist:e2fefa48c79bafb59b23ffefa8384bb3
Last active May 9, 2024 08:13
MikroTik wireless channels
/interface wireless channels
add band=2ghz-b/g/n width=20 list=2GHz/20MHz frequency=2412 name=ch1
add band=2ghz-b/g/n width=20 list=2GHz/20MHz frequency=2437 name=ch6
add band=2ghz-b/g/n width=20 list=2GHz/20MHz frequency=2462 name=ch11
add band=5ghz-onlyac width=20 list=5GHz/80MHz extension-channel=Ceee frequency=5180 name=ch36/38/42
add band=5ghz-onlyac width=20 list=5GHz/80MHz extension-channel=eCee frequency=5200 name=ch40/38/42
add band=5ghz-onlyac width=20 list=5GHz/80MHz extension-channel=eeCe frequency=5220 name=ch44/46/42
add band=5ghz-onlyac width=20 list=5GHz/80MHz extension-channel=eeeC frequency=5240 name=ch48/46/42
@lifehome
lifehome / README.md
Last active February 25, 2024 06:34 — forked from benkulbertis/cloudflare-update-record.sh
Cloudflare API v4 Dynamic DNS Update in Bash

Cloudflare DDNS bash client with systemd

This is a bash script to act as a Cloudflare DDNS client, useful replacement for ddclient.

Look out!

A newer version is available!

This gist will no longer update, instead please go to https://github.com/lifehome/systemd-cfddns for more updated versions.

How to use?

  1. Put the cfupdater files to /usr/local/bin
  • If you are using IPv4 for A record, append -v4 to cfupdater in the following systemd service unit.
@seanhandley
seanhandley / docker-compose.yml
Last active April 9, 2024 04:05
How To Set Up Docker For Mac (Mojave) with Native NFS
version: '2'
services:
api:
volumes:
- "nfsmount:${CONTAINER_DIR}"
volumes:
nfsmount:
driver: local
driver_opts:
@jiahuif
jiahuif / main.go
Created October 16, 2017 06:00
golang: tunnel tcp over socks5
package main
import (
"flag"
"io"
"net"
"time"
log "github.com/sirupsen/logrus"
"golang.org/x/net/proxy"
@zxp
zxp / interfaces
Created August 29, 2017 11:57
修改网卡MAC地址然后运行dhclient获取IP地址 /etc/network/interfaces
auto eth1
iface eth1 inet manual
hwaddress 54:93:59:**:**:**
pre-up ip l set eth1 address 54:93:59:**:**:**
post-up dhclient -nw eth1
@zxp
zxp / dhclient.conf
Last active March 1, 2023 13:56
模拟四川电信ITV盒子的DHCP客户端配置 /etc/dhcp/dhclient.conf
interface "eth1" {
# 发送终端名,这个抓盒子发的包直接送出去就好了,是个32字节的字符串
send host-name "00109199************************";
# 发送机顶盒的MAC地址,我的华为的盒子是54:93:59开头的
send dhcp-client-identifier "\054:93:59:**:**:**";
# 电信用了Option60验证终端是否为盒子,按照抓包出来的字符串原样发送
send vendor-class-identifier "SCITV";
request subnet-mask, rfc3442-classless-static-routes, static-routes,
routers, domain-name-servers, host-name, domain-name,
interface-mtu, broadcast-address, ntp-servers,
@zxp
zxp / SCITV_UDPXY.M3U
Last active May 6, 2024 07:21
[四川电信ITV 190个频道的组播表] 四川电信IPTV 190个频道的组播表,截取于2017年8月 #scitv #iptv #sichuan
#EXTM3U name="四川电信IPTV"
#EXTINF:-1,CCTV-1高清
http://192.168.2.2/rtp/239.93.0.184:5140
#EXTINF:-1,CCTV-2高清
http://192.168.2.2/rtp/239.93.1.23:6000
#EXTINF:-1,CCTV-3高清
http://192.168.2.2/rtp/239.93.1.11:2223
#EXTINF:-1,CCTV-5高清
http://192.168.2.2/rtp/239.93.1.12:2224
#EXTINF:-1,CCTV-6高清
@Chion82
Chion82 / client.c
Created February 12, 2017 14:56
fake TCP test
#include <stdio.h>
#include <stdlib.h>
#include <arpa/inet.h>
#include <string.h>
#include "trans_packet.h"
void on_packet_recv(char* from_ip, uint16_t from_port, char* payload, int size, unsigned int seq) {
printf("Packet received from=%s:%d, seq=%d\n", from_ip, from_port, seq);
char* message = (char*)malloc(size);
memcpy(message, payload, size);