OpenWrt-HelloWorld科学上网

Tianling Shen 90fc3beade luci-app-ssr-plus: add VMess ZERO encMod 4 лет назад
.github a81e5f3f47 CI: fix determine changed pacakges 4 лет назад
luci-app-ssr-plus 90fc3beade luci-app-ssr-plus: add VMess ZERO encMod 4 лет назад
naiveproxy d9dd5b01f8 naiveproxy: apply mirrors to all chromium files 4 лет назад
shadowsocks-rust 116ed0833d shadowsocks-rust:Update to v1.12.2 4 лет назад
shadowsocksr-libev 5c3542623c shadowsocksr-libev: add TPROXY support for TCP (ssr-redir) 4 лет назад
simple-obfs 1760e1f8e6 simple-obfs: add new package 4 лет назад
tcping 6c5a2f350c tcping: Update to latest tag 0.3 4 лет назад
trojan 118f75e9f0 trojan: add new package 4 лет назад
v2ray-core b021e3d55b *ray-core: bump geodata to latest version 4 лет назад
v2ray-plugin 9ed9a8ea96 *ray-plugin: cleanup Makefile 4 лет назад
xray-core b021e3d55b *ray-core: bump geodata to latest version 4 лет назад
xray-plugin 9ed9a8ea96 *ray-plugin: cleanup Makefile 4 лет назад
README.md 4220e84707 docs(README): add documentation for upx tool 4 лет назад

README.md

Setup instruction

Method 1 - Clone this repo directly

  1. Clone this repo:

    rm -rf package/helloworld
    git clone --depth=1 https://github.com/fw876/helloworld.git package/helloworld
    
  2. Pull upstream commits:

    git -C package/helloworld pull
    
  • Remove

    rm -rf package/helloworld
    

Method 2 - Add this repo as a git submodule

  1. Add new submodule:

    rm -rf package/helloworld
    git submodule add -f --name helloworld https://github.com/fw876/helloworld.git package/helloworld
    
  2. Pull upstream commits:

    git submodule update --remote package/helloworld
    
  • Remove

    git submodule deinit -f package/helloworld
    git rm -f package/helloworld
    git reset HEAD .gitmodules
    rm -rf .git/modules{/,/package/}helloworld
    

Method 3 - Add this repo as an OpenWrt feed

  1. Add new feed:

    sed -i "/helloworld/d" "feeds.conf.default"
    echo "src-git helloworld https://github.com/fw876/helloworld.git" >> "feeds.conf.default"
    
  2. Pull upstream commits:

    ./scripts/feeds update helloworld
    ./scripts/feeds install -a -f -p helloworld
    
  • Remove

    sed -i "/helloworld/d" "feeds.conf.default"
    ./scripts/feeds clean
    ./scripts/feeds update -a
    ./scripts/feeds install -a
    

Note

If you want to use this repo with official OpenWrt source tree, the following tools and packages need to be added manually:

tools:

packages:

You may use svn to check them out, e.g.:

mkdir -p package/helloworld
for i in "dns2socks" "microsocks" "ipt2socks" "pdnsd-alt" "redsocks2"; do \
  svn checkout "https://github.com/immortalwrt/packages/trunk/net/$i" "package/helloworld/$i"; \
done

You should manually add the following code into tools/Makefile, make sure to add code before the compile command:

tools-y += ucl upx
$(curdir)/upx/compile := $(curdir)/ucl/compile

e.g.:

svn checkout https://github.com/coolsnowwolf/lede/trunk/tools/ucl tools/ucl
svn checkout https://github.com/coolsnowwolf/lede/trunk/tools/upx tools/upx

sed -i 'N;24a\tools-y += ucl upx' tools/Makefile
sed -i 'N;40a\$(curdir)/upx/compile := $(curdir)/ucl/compile' tools/Makefile

You should note that hard-coding the line number is not an ideal solution. It may destroy the structure of the original file due to the update of the openwrt source code and cause unexpected problems.