- This gist has been moved here: https://github.com/Anime4000/RTL9601C1 (Full Guide)
- Open a issue to start a discussion
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 ( | |
"flag" | |
"io" | |
"log" | |
"net" | |
"net/http" | |
"os" | |
"strings" |
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
/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 |
This is a bash script to act as a Cloudflare DDNS client, useful replacement for ddclient.
This gist will no longer update, instead please go to https://github.com/lifehome/systemd-cfddns for more updated versions.
- Put the
cfupdater
files to/usr/local/bin
- If you are using IPv4 for A record, append
-v4
tocfupdater
in the following systemd service unit.
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
version: '2' | |
services: | |
api: | |
volumes: | |
- "nfsmount:${CONTAINER_DIR}" | |
volumes: | |
nfsmount: | |
driver: local | |
driver_opts: |
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 ( | |
"flag" | |
"io" | |
"net" | |
"time" | |
log "github.com/sirupsen/logrus" | |
"golang.org/x/net/proxy" |
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
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 |
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
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, |
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
#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高清 |
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
#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); |
NewerOlder