Git Product home page Git Product logo

qoli / merlin.c Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 0.0 15.49 MB

面向 ASUS﹣MERLIN 的 SS Web 管理面板。只支持 http://koolshare.io 下的固件版本。

Home Page: https://qoli.github.io/Merlin.PHP/

Shell 10.71% C 78.74% ASP 0.09% Python 0.60% Dockerfile 0.04% Roff 0.23% Makefile 6.47% M4 0.69% C++ 2.09% sed 0.01% Perl 0.08% CMake 0.01% Batchfile 0.01% Lua 0.12% Vim Script 0.07% Objective-C 0.06% XSLT 0.02%

merlin.c's Introduction

Fire(Merlin) C Server

基於 C 編寫的 Server 服務器端,與 Fire Router 進行通信

目錄

asuswrt-merlin-build

交叉編譯 Dockerfile

shBuildForInstall

為 install 安裝文件打包

shDocker

docker 操作腳本

sourceFireServer

核心代碼

  • fireServer.c 通信服務器
  • fireClientSend.c 發送信息
  • fireClientRead.c 讀取信息
sourceTestClient

測試客戶端

TODO

  • Socket 通信基礎層搭建

  • Socket 各平台客戶端

  1. iOS
  2. Android
  3. Mac
  4. Windows
  5. Linux
  6. ARM-Linux
  • 指令執行
  • 指令 stdout 回顯(Socket)
  • 通信加密
  1. Base64
  2. Base64 + 鹽

服務器端初始化流程

  1. asuswrt-merlin-build 下運行 download_merlin.sh 下載梅林源碼
  2. shDocker 下 install.sh 初始化 Docker 的 交叉編譯 環境
  3. 在「sourceFireServer」下建立「lib」放置 libevent-2.1.8-stable 庫文件

使用前注意修改 install.sh 裡面的文件位置

服務器端的編譯流程

  1. shDocker: run.sh 進入 交叉編譯 容器
  2. 打開 root/build 目錄,運行 shBuild-Server.sh 腳本

編譯 fireServer

arm-linux-g++ fireServer.cpp -o ./Binary/fireServer -I/opt/crossinstall/libevent/include/ -L/opt/crossinstall/libevent/lib/ -lrt -levent -static

編譯 libevent

靜態編譯
./configure -disable-shared -enable-static --prefix=/opt/crossinstall/libevent --host=arm-linux CC=arm-linux-gcc CXX=arm-linux-g++
動態編譯
./configure --prefix=/opt/crossinstall/libevent --host=arm-linux CC=arm-linux-gcc CXX=arm-linux-g++
make
make install

參考

http://telegra.ph/交叉编译原版shadowsocks为koolshare梅林ss插件续命-08-07

問題解決

arm-linux-gcc 權限問題
➜  build arm-linux-gcc -v           
zsh: permission denied: arm-linux-gcc
cd /home/asuswrt-merlin/release/src-rt-6.x.4708/toolchains/hndtools-arm-linux-2.6.36-uclibc-4.5.3/bin/

chmod +x arm-linux-gcc

merlin.c's People

Contributors

qoli avatar

Stargazers

 avatar  avatar septs avatar  avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.