From 4c258e12764150ade1cc355dde0978dd11cac039 Mon Sep 17 00:00:00 2001 From: rofl0r Date: Fri, 12 Apr 2019 23:06:50 +0100 Subject: [PATCH] update README and Makefile for RcB2 --- Makefile | 14 ++++++++------ README | 9 ++++++--- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 28e203a..b7a29e3 100644 --- a/Makefile +++ b/Makefile @@ -5,13 +5,15 @@ LINKLIBS= FNAME=socksserver MAINFILE=$(FNAME).c -CFLAGS_OWN=-Wall -D_GNU_SOURCE -std=c99 -static +-include config.mak + +CFLAGS_OWN=-Wall -D_GNU_SOURCE -std=c99 -static $(CFLAGS) #c99 for firedns compatibility (restrict keyword) CFLAGS_DBG=-g -O0 -CFLAGS_OPT=-s -Os +CFLAGS_OPT=-s -Os -flto -fwhole-program CFLAGS_OPT_HEAVY=$(CFLAGS_OPT) -flto -fwhole-program -fno-asynchronous-unwind-tables -nostartfiles $(MUSL_DIR)/lib/crt1.o --include config.mak +RCB=rcb2 CFLAGS_RCB_OPTH=${CFLAGS_OWN} ${CFLAGS_OPT_HEAVY} -I ${INCLUDES} ${LINKLIBS} ${CFLAGS} CFLAGS_RCB_OPT=${CFLAGS_OWN} ${CFLAGS_OPT} -I ${INCLUDES} ${LINKLIBS} ${CFLAGS} @@ -23,16 +25,16 @@ clean: rm $(FNAME).rcb $(FNAME).out $(FNAME).o optimized-heavy: - CFLAGS="${CFLAGS_RCB_OPTH}" rcb --force ${RCBFLAGS} ${MAINFILE} + CFLAGS="${CFLAGS_RCB_OPTH}" $(RCB) ${RCBFLAGS} ${MAINFILE} strip --remove-section .comment $(FNAME).out strip --remove-section .comment.SUSE.OPTs $(FNAME).out optimized: - CFLAGS="${CFLAGS_RCB_OPT}" rcb --force ${RCBFLAGS} ${MAINFILE} + CFLAGS="${CFLAGS_RCB_OPT}" $(RCB) ${RCBFLAGS} ${MAINFILE} strip --remove-section .comment $(FNAME).out debug: - CFLAGS="${CFLAGS_RCB_DBG}" rcb --force ${RCBFLAGS} ${MAINFILE} + CFLAGS="${CFLAGS_RCB_DBG}" $(RCB) ${RCBFLAGS} ${MAINFILE} .PHONY: all optimized debug diff --git a/README b/README index ba71147..88d2d55 100644 --- a/README +++ b/README @@ -21,15 +21,18 @@ git clone https://github.com/rofl0r/rocksocks5 socksserver git clone https://github.com/rofl0r/libulz lib git clone https://github.com/rofl0r/rocksock git clone -b custom https://github.com/rofl0r/firedns firedns -git clone https://github.com/rofl0r/rcb -export PATH=$PATH:/tmp/socksserver-0000/rcb -ln -s /tmp/socksserver-0000/rcb/rcb.pl /tmp/socksserver-0000/rcb/rcb +git clone https://github.com/rofl0r/rcb2 +export PATH=$PATH:/tmp/socksserver-0000/rcb2 +ln -s /tmp/socksserver-0000/rcb2/rcb2.py /tmp/socksserver-0000/rcb2/rcb2 cd socksserver cp dist/config.mak . #your favorite editor here nano config.mak +# add your prefered cflags, e.g.: +# CFLAGS = -DIPV4_ONLY -DNO_DNS_SUPPORT -DNO_LOG -DNO_DAEMONIZE -DNO_IDSWITCH + #your favorite C compiler here export CC=gcc make -- 2.11.4.GIT