Skip to content

Instantly share code, notes, and snippets.

@wwalker
wwalker / gist:5331226
Last active October 8, 2020 03:38
vboxheadless vrde not working - SOLVED
[wwalker@uranium ~] [] $ vboxmanage showvminfo $VBID | egrep -i 'rde|vid'
2D Video Acceleration: off
Video mode: 720x400x0
VRDE: enabled (Address 0.0.0.0, Ports 3389, MultiConn: off, ReuseSingleConn: off, Authentication type: null)
Video redirection: disabled
VRDE Connection: not active
[wwalker@uranium ~] [] $ ps -ef | grep -i vbox[h]
wwalker 20242 19404 6 11:30 pts/9 00:00:35 /usr/lib64/virtualbox/VBoxHeadless -s 70147e5d-3c65-411e-b94e-369be8c7cc77 -v enable
@wen-long
wen-long / ss-redir 透明代理.md
Last active March 18, 2024 12:13
ss-redir 透明代理.md

##ss-redir 的 iptables 配置(透明代理)

透明代理指对客户端透明,客户端不需要进行任何设置就使用了网管设置的代理规则

创建 /etc/ss-redir.json 本地监听 7777 运行ss-redir -v -c /etc/ss-redir.json

iptables -t nat -N SHADOWSOCKS
# 在 nat 表中创建新链
iptables -t nat -A SHADOWSOCKS -p tcp --dport 23596 -j RETURN
# 23596 是 ss 代理服务器的端口,即远程 shadowsocks 服务器提供服务的端口,如果你有多个 ip 可用,但端口一致,就设置这个
@simlun
simlun / raspi-monitor
Last active June 9, 2024 15:15
Script to enable and disable the HDMI signal of the Raspberry PI
#!/bin/bash -e
# /usr/local/sbin/raspi-monitor
# Script to enable and disable the HDMI signal of the Raspberry PI
# Inspiration: http://www.raspberrypi.org/forums/viewtopic.php?t=16472&p=176258
CMD="$1"
function on {
/opt/vc/bin/tvservice --preferred
@danackerson
danackerson / 100_base.conf
Last active October 20, 2023 10:11
using nginx + lua + redis for redirects and rewrites
# using such a setup requires `apt-get install lua-nginx-redis` under Ubuntu Trusty
# more info @ http://wiki.nginx.org/HttpLuaModule#access_by_lua
http {
lua_package_path "/etc/nginx/include.d/?.lua;;";
lua_socket_pool_size 100;
lua_socket_connect_timeout 10ms;
lua_socket_read_timeout 10ms;
server {
@qwIvan
qwIvan / shadowiptables.sh
Last active February 28, 2023 22:57
自动翻墙脚本,配合shadowsocks-libev的ss-redir使用,需要ipset(sudo apt-get install ipset)
#!/bin/bash
#自动翻墙脚本,配合shadowsocks-libev的ss-redir使用。需要ipset
chnroute_file=~/.chnroute
ignore_ips=(
45.32.50.160
45.127.93.239
103.214.68.175
0.0.0.0/8
10.0.0.0/8
127.0.0.0/8
@sagivo
sagivo / gist:3a4b2f2c7ac6e1b5267c2f1f59ac6c6b
Last active May 29, 2024 13:06
webRTC stun / turn server list
to check if the server works - https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice
stun:
stun.l.google.com:19302,
stun1.l.google.com:19302,
stun2.l.google.com:19302,
stun3.l.google.com:19302,
stun4.l.google.com:19302,
stun.ekiga.net,
stun.ideasip.com,
@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);
@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高清
@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 / 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