当前位置: 首页> 财经> 股票 > 好玩的微信小程序游戏排行榜前十名_快速搭建论坛_网店代运营公司靠谱吗_福州seo推广公司

好玩的微信小程序游戏排行榜前十名_快速搭建论坛_网店代运营公司靠谱吗_福州seo推广公司

时间:2025/8/25 0:12:43来源:https://blog.csdn.net/yishengzhiai005/article/details/147245651 浏览次数:0次
好玩的微信小程序游戏排行榜前十名_快速搭建论坛_网店代运营公司靠谱吗_福州seo推广公司

准备:intel x86_64芯片的mac电脑,系统为mac os15.3.1,iphone为6s的ios14.4(rootful越狱)

第一步:准备工具链(推荐使用 theos + clang

如果你已经安装过 Theos(或 NewTheos),直接用它内置的 clang 就能编译出 iOS Mach-O 可执行文件。

如果没有,可以这样安装:

# 安装 theos(推荐)
git clone --recursive https://github.com/theos/theos.git ~/theos

 

第二步:准备依赖库 libevent

你需要为 iOS 编译静态版本的 libevent:

git clone https://github.com/libevent/libevent.git
cd libevent
brew install autoconf automake libtool
./autogen.sh# 设置编译环境(假设你用 Xcode CLI 工具)
export SDK=$(xcrun --sdk iphoneos --show-sdk-path)
export CC="$(xcrun --sdk iphoneos -f clang)"
export CFLAGS="-isysroot $SDK -arch arm64 -miphoneos-version-min=10.0"./configure --host=arm-apple-darwin --disable-shared --enable-static
make

第三步:获取并修改 redsocks 源码

git clone https://github.com/darkk/redsocks.git
cd redsocks

       更新一下Makefile更是和mac系统

# Compiler settings
CC := gcc
CFLAGS := -g -O2 -std=c99 -D_XOPEN_SOURCE=600 -D_DEFAULT_SOURCE -D_GNU_SOURCE -Wall
LDFLAGS := # Libraries
LIBS := -levent_core
ifeq ($(DBG_BUILD),1)LIBS += -levent_extra
endif# Sources and objects
SRCS := parser.c main.c redsocks.c log.c http-connect.c socks4.c socks5.c http-relay.c base.c base64.c md5.c http-auth.c utils.c redudp.c dnstc.c dnsu2t.c gen/version.c
OBJS := $(SRCS:.c=.o)
DEPS := .depend
OUT := redsocks
VERSION := 0.5
CONF := config.h# Directories
GEN_DIR := gen# Targets
.PHONY: all clean distclean test tags# Default target
all: $(OUT)# Generate version.c
gen/version.c: *.c *.h $(GEN_DIR)/.buildrm -f $@.tmpecho '/* this file is auto-generated during build */' > $@.tmpecho '#include "../version.h"' >> $@.tmpecho 'const char* redsocks_version = ' >> $@.tmpif [ -d .git ]; then \echo '"redsocks.git/'`git describe --tags`'"'; \if [ `git status --porcelain | grep -v -c '^??'` != 0 ]; then \echo '"'"-unclean-$(shell date --rfc-3339=seconds | tr ' ' 'T')-$(USER)@$(shell uname -n)"'"'; \fi \else \echo '"redsocks/$(VERSION)"'; \fi >> $@.tmpecho ';' >> $@.tmpmv -f $@.tmp $@# Create necessary directories
$(GEN_DIR)/.build:mkdir -p $(GEN_DIR)touch $@# Dependency generation
$(DEPS): $(SRCS)$(CC) -MM $(SRCS) 2>/dev/null > $(DEPS) || \( \# Handle missing dependencies properly with correct formatting \for SRC in $(SRCS); do \echo -n "$${SRC%.c}.o: " >> $(DEPS); \# Collect includes for each source file \export SRC_DEPS="`sed '/^\#[ \t]*include \?"\(.*\)".*/!d;s//\1/' $$SRC | sort`"; \while true; do \export SRC_DEPS_OLD="$$SRC_DEPS"; \# Recursively collect dependencies \export SRC_DEPS="`echo $$SRC_DEPS | sed 's/  */\n/g' | sort`"; \test "$$SRC_DEPS" = "$$SRC_DEPS_OLD" && break; \done; \echo $$SRC $$SRC_DEPS >> $(DEPS); \done; \)# Include dependencies
-include $(DEPS)# Final executable
$(OUT): $(OBJS)$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)# Clean the build
clean:$(RM) $(OUT) $(OBJS) $(CONF) $(DEPS)# Clean everything, including generated files
distclean: clean$(RM) tags $(DEPS)$(RM) -r $(GEN_DIR)# Create tags for code navigation
tags: *.c *.hctags -R# Run tests
test: tests/__build-tstamp__ tests/prlimit-nofilecd tests && env $(TEST_ENV) ./run# Build tests
tests/__build-tstamp__: $(OUT) tests/[a-z]* tests/[a-z]*/*cd tests && ./buildtouch $@# Build test for prlimit
tests/prlimit-nofile: tests/prlimit-nofile.c$(CC) $(CFLAGS) -o $@ $^

第四步:交叉编译 redsocks

export SDK=$(xcrun --sdk iphoneos --show-sdk-path)
export CC="$(xcrun --sdk iphoneos -f clang)"
export CFLAGS="-isysroot $SDK -arch arm64 -miphoneos-version-min=10.0"
export LDFLAGS="-L/path/to/libevent/.libs"make

第五步:签名(越狱设备免验证也建议做)

brew install ldid
ldid -S redsocks

第六步:推送到 iPhone

scp redsocks root@<iphone-ip>:/usr/local/bin/
scp redsocks.conf root@<iphone-ip>:/etc/

第七步:启动测试

chmod +x /usr/local/bin/redsocks
/usr/local/bin/redsocks -c /etc/redsocks.conf

第八步:编译Openssl3.5.0(可选)

git clone https://github.com/x2on/OpenSSL-for-iPhone.git
cd OpenSSL-for-iPhone#您可以尝试在构建脚本中添加以下选项来禁用 Bitcode:export CFLAGS="-fno-bitcode"
export LDFLAGS="-fno-bitcode"./build-libssl.sh clean
./build-libssl.sh

关键字:好玩的微信小程序游戏排行榜前十名_快速搭建论坛_网店代运营公司靠谱吗_福州seo推广公司

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: