Skip to content

Instantly share code, notes, and snippets.

@killbus
killbus / custom phicomm k3 openwrt firmware with imageBuilder.md
Last active February 13, 2020 09:48
custom phicomm k3 openwrt firmware with imageBuilder

build command

make image PROFILE="phicomm-k3" PACKAGES="luci-i18n-ddns-zh-cn block-mount kmod-usb-storage kmod-usb-storage-extras kmod-fs-vfat kmod-fs-ext4 kmod-fs-ntfs ntfs-3g ntfs-3g-utils luci-app-firewall luci-base luci-lib-ip luci-lib-nixio luci-mod-admin-full luci-proto-ppp luci-theme-bootstrap luci ddns-scripts_cloudflare.com-v4 iptables-mod-tproxy curl lua-cjson bash coreutils-base64 luci-app-sqm k3screenctrl frpc luci-app-frpc luci-i18n-base-zh-cn fdisk usbutils kmod-usb-core kmod-usb2 kmod-usb3 e2fsprogs f2fs-tools kmod-fs-f2fs brcmfmac-firmware-usb kmod-phy-bcm-ns-usb2 kmod-phy-bcm-ns-usb3 kmod-usb-ledtrig-usbport brcmfmac-firmware-usb kmod-usb-bcma kmod-usb-storage-uas ca-certificates mwan3 luci-app-mwan3 luci-i18n-mwan3-zh-cn luci-app-mwan3helper luci-i18n-mwan3helper-zh-cn dnsmasq-full openssl-util luci-ssl luci-ssl-openssl luci-ssl-nginx -dnsmasq" FILES=files/

driver to use:

brcmfmac4366c-pcie.bin.69027 from [https://github.com/Hill-98/phicommk3-firmware](https://github.com

iptables_quota.sh

#!/bin/bash
iptables -F quota33g
iptables -N quota33g
iptables -A quota33g -m quota --quota 35433480192 -j RETURN
iptables -A quota33g -d <bastion_server_ip> -j ACCEPT
iptables -A quota33g -j DROP

iptables -F OUTPUT
CONFIG_TARGET_bcm53xx=y
CONFIG_TARGET_MULTI_PROFILE=y
CONFIG_TARGET_DEVICE_bcm53xx_DEVICE_phicomm-k3=y
CONFIG_TARGET_DEVICE_bcm53xx_DEVICE_phicomm-k3=y
CONFIG_ARIA2_BITTORRENT=y
CONFIG_ARIA2_NOXML=y
CONFIG_ARIA2_OPENSSL=y
CONFIG_ARIA2_WEBSOCKET=y
CONFIG_BUILD_PATENTED=y

How to Open Link in New Tab with Hugo's new Goldmark Markdown Renderer

layouts
└── _default
    └── _markup
        └── render-link.html
@killbus
killbus / docker tranparent proxy overture dns clash gateway.md
Last active March 14, 2020 20:20
docker 透明代理实现:overture + clash
@killbus
killbus / build official openwrt for phicomm k3 with lean packages.md
Last active March 4, 2024 09:23
including the guide to complie single package

Step 1: Preparing lean's source

clone lean source:

git clone https://github.com/coolsnowwolf/lede

update and install feed

rule for host

iptables -t nat -A DOCKER ! -i <container-bridge> -p udp --match multiport --dports 1024:65535 -j DNAT --to-destination <container-internal-ip>

Some Sources

https://github.com/team-brh/game-servers
https://blog.chionlab.moe/2018/02/09/full-cone-nat-with-linux/
https://blog.csdn.net/jk110333/article/details/8229828

with bash

#!/bin/bash



[ ! -d splitted ] && mkdir splitted

while read domain
#!/bin/bash
PROGRAM_NAME="$(basename "${0}")"
logdate() {
date "+%Y-%m-%d %H:%M:%S"
}
log() {
local status="${1}"