海运的博客

联通贝尔光猫G-140W-UG修改为桥接/管理员密码并开启telnet

发布时间:April 20, 2023 // 分类: // 2 Comments

1.修改管理员密码,WEB修改普通用户密码用浏览器F12网络拦截或监听后编辑重发请求,修改url中的set为set_super,将POST参数中pswdNew替换成pswdNewSuper、pswdConfirm替换成pswdConfirmSuper。
2.设置拨号桥接:
internet.jpg
iptv配置:
iptv.jpg
备份下tr09参数,可以删除
tr09.jpg
3.访问 http://192.168.1.1/system.cgi?telnet 开启telnet。
如需修改SN和MAC:

ritool dump
ritool set YPSerialNum ALCLxxxxxxxx #SN码
ritool set MACAddress xx:xx:xx:xx #MAC地址 

这猫用来桥接够用了,跑满千m宽带不占用CPU资源,top查看sirq无占用,/proc/softirqs内NET_TX和NET_RX很小,说明走的是硬桥接。
但是IPTV走的是软桥接,流量也不大,CPU够用。
更新:IPTV协议封装选PPPOE是硬桥接。
https://wp.for-get.com/538.html
https://www.sohu.com/a/389057275_662688

linux/openwrt清空iptables连接跟踪状态表conntrack

发布时间:April 19, 2023 // 分类: // No Comments

最近在用iptables mark后做qos,当规则更新后要先清空下conntrack,不然之前已建立连接的mark并不改变,影响后续的判断。
使用conntrack工具:

conntrack -F

openwrt可使用以下方法:

echo f > /proc/net/nf_conntrack

openwrt如有开启hnat需先关闭再清除conntrack,不然无效,如mtk/360t7闭源驱动:

echo 0 > /sys/kernel/debug/hnat/qos_toggle
echo 0 > /sys/kernel/debug/hnat/hook_toggle

https://forum.openwrt.org/t/mwan3-how-to-flush-firewall-conntrack-table/133776

debian11或pve编译安装最新版qbittorrent-nox

发布时间:February 5, 2023 // 分类: // No Comments

安装编译环境:

apt install build-essential pkg-config automake libtool

编译libtorrent-rasterbar-1.2.18:

apt install libboost-system-dev libssl-dev
#也可使用git clone最新代码
#git clone --branch RC_1_2 --depth=1 --recurse-submodules https://github.com/arvidn/libtorrent.git
wget https://github.com/arvidn/libtorrent/releases/download/v1.2.18/libtorrent-rasterbar-1.2.18.tar.gz
tar zxf libtorrent-rasterbar-1.2.18.tar.gz 
cd libtorrent-rasterbar-1.2.18/  
./configure --prefix=/usr/local/libtorrent-1.2.18 CXXFLAGS=-std=c++14  
make -j$(nproc) && make install

编译qbittorrent-nox4.5.0:

apt install qtbase5-dev qttools5-dev libqt5svg5-dev zlib1g-dev
#也可使用git clone最新代码
#git clone --branch v4_5_x --depth=1 https://github.com/qbittorrent/qBittorrent.git
wget https://github.com/qbittorrent/qBittorrent/archive/refs/tags/release-4.5.0.tar.gz
tar zxf release-4.5.0.tar.gz 
cd qBittorrent-release-4.5.0/  
export CPLUS_INCLUDE_PATH=/usr/local/libtorrent-1.2.18/include/               
export PKG_CONFIG_PATH=/usr/local/libtorrent-1.2.18/lib/pkgconfig
./configure --prefix=/usr/local/qbittorrent-4.5.0 --disable-gui 
make -j$(nproc) && make install

qbittorrent 4.5.0版本web不能显示中文解决:

sed -i 's/value="zh">/value="zh_CN">/' src/webui/www/private/views/preferences.html

如只安装一个版本的libtorren启动qbittorrent:

echo '/usr/local/libtorrent/lib' > /etc/ld.so.conf.d/libtorrent-x86_64.conf 
ldconfig
/usr/local/qbittorrent-4.5.0/bin/qbittorrent-nox

多个版本libtorren:

LD_LIBRARY_PATH=/usr/local/libtorrent-1.2.18/lib/ /usr/local/qbittorrent-4.5.0/bin/qbittorrent-nox

systemd service添加:

Environment="LD_LIBRARY_PATH=/usr/local/libtorrent-1.2.18/lib/"

用cmake编译libtorrent-2.0版本及qbittorrent4.5.0:

apt install cmake ninja-build
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/libtorrent-2.0.8 -DCMAKE_CXX_STANDARD=14 
cmake --build build
cmake --install build
export CPLUS_INCLUDE_PATH=/usr/local/libtorrent-2.0.8/include/              
export PKG_CONFIG_PATH=/usr/local/libtorrent-2.0.8/lib/pkgconfig
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/qbittorrent-4.5.0-lt20 -DGUI=OFF -DSTACKTRACE=OFF 
cmake --build build
cmake --install build

debian11使用qt6编译qbittorrent,需开启bullseye-backports源:

apt install qt6-base-dev qt6-tools-dev zlib1g-dev -t bullseye-backports
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/qbittorrent-4.5.1 -DGUI=OFF -DSTACKTRACE=OFF -DQT6=ON

如要在其它机器上运行需安装依赖:

apt install libqt6network6 libqt6sql6 libqt6xml6 libqt6core6 -t bullseye-backports 

libtorrent-2.0.8使用注意,默认磁盘io类型为内存映射文件,qbittorrent占用shr内存很大,且关闭系统缓存后下载上传很慢。
将磁盘io更改为posix无此问题。

经典版本4.3.9:

#wget https://github.com/arvidn/libtorrent/releases/download/v1.2.14/libtorrent-rasterbar-1.2.14.tar.gz
#tar zxf libtorrent-rasterbar-1.2.14.tar.gz 
#cd libtorrent-rasterbar-1.2.14/
git clone --branch RC_1_2 https://github.com/arvidn/libtorrent.git
cd libtorrent
#qbittorrent4.39发布时使用的libtorrent版本
git checkout 28ebc276224021d93d958e2f2de445c35898a23e
git submodule update --init --recursive
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/libtorrent-1.2.14 -DCMAKE_CXX_STANDARD=14 
cmake --build build  
cmake --install build
git clone --branch v4_3_x --depth=1 https://github.com/qbittorrent/qBittorrent.git
cd qBittorrent/
export CPLUS_INCLUDE_PATH=/usr/local/libtorrent-1.2.14/include/  
export PKG_CONFIG_PATH=/usr/local/libtorrent-1.2.14/lib/pkgconfig
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/qbittorrent-4.3.9 -DGUI=OFF -DSTACKTRACE=OFF
cmake --build build  
cmake --install build

https://web.archive.org/web/20211102073721/https://www.qbittorrent.org/download.php
https://github.com/qbittorrent/qBittorrent/wiki#compilation
https://github.com/qbittorrent/qBittorrent/wiki/Compilation:-Debian-and-Ubuntu
https://github.com/qbittorrent/qBittorrent/wiki/Compilation-with-CMake:-common-information
https://github.com/arvidn/libtorrent/blob/RC_2_0/docs/building.rst#building-with-cmake

x86运行arm64 docker

发布时间:January 19, 2023 // 分类: // 1 Comment

docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker run --name test -i -t arm64v8/ubuntu /bin/bash

更多:
https://github.com/multiarch/qemu-user-static

编译纯净版k2p padavan支持802.11 kvr固件

发布时间:December 14, 2022 // 分类: // No Comments

安装依赖及下载源码:

apt install unzip libtool-bin curl cmake gperf gawk flex bison nano xxd fakeroot kmod cpio git python3-docutils gettext automake autopoint texinfo build-essential help2man pkg-config zlib1g-dev libgmp3-dev     libmpc-dev libmpfr-dev libncurses5-dev libltdl-dev wget libc-dev-bin bc
git clone https://github.com/padavanonly/padavan-4.4.git --depth=1
cd padavan-4.4/toolchain-mipsel
./dl_toolchain.sh

编辑trunk/build_firmware_modify注释掉特殊服务,并移除相应asp管理页面,不然编译后有相关菜单。
更新:首次编译前注释相关软件包就行。

rm trunk/user/www/n56u_ribbon_fixed/Shadows*.asp 
rm trunk/user/www/n56u_ribbon_fixed/Advanced_aliddns.asp 
rm trunk/user/www/n56u_ribbon_fixed/Advanced_SQM.asp 
rm trunk/user/www/n56u_ribbon_fixed/Advanced_adbyby.asp

编译固件:

cd trunk/
fakeroot ./build_firmware_modify K2P
分类
最新文章
最近回复
  • opnfense: 谢谢博主!!!解决问题了!!!我之前一直以为内置的odhcp6就是唯一管理ipv6的方式
  • liyk: 这个方法获取的IPv6大概20分钟之后就会失效,默认路由先消失,然后Global IPV6再消失
  • 海运: 不好意思,没有。
  • zongboa: 您好,請問一下有immortalwrt設定guest Wi-Fi的GUI教學嗎?感謝您。
  • 海运: 恩山有很多。
  • swsend: 大佬可以分享一下固件吗,谢谢。
  • Jimmy: 方法一 nghtp3步骤需要改成如下才能编译成功: git clone https://git...
  • 海运: 地址格式和udpxy一样,udpxy和msd_lite能用这个就能用。
  • 1: 怎么用 编译后的程序在家里路由器内任意一台设备上运行就可以吗?比如笔记本电脑 m参数是笔记本的...
  • 孤狼: ups_status_set: seems that UPS [BK650M2-CH] is ...
归档