diff --git a/README.md b/README.md index 073bc83c..eaa604f8 100644 --- a/README.md +++ b/README.md @@ -354,10 +354,7 @@ Currently you need to use a patched libev library for MinGW: * https://github.com/shadowsocks/libev/archive/mingw.zip -Notice that Windows (MinGW) version has some differences from other platforms: - -1. No support of plugins at the moment. -2. TCP Fast Open (TFO) is only available on **Windows 10**, **1607** or later version (precisely, build >= 14393). If you are using **1709** (build 16299) or later version, you also need to run the following command in PowerShell/Command Prompt **as Administrator** and **reboot** to use TFO properly: +Notice that TCP Fast Open (TFO) is only available on **Windows 10**, **1607** or later version (precisely, build >= 14393). If you are using **1709** (build 16299) or later version, you also need to run the following command in PowerShell/Command Prompt **as Administrator** and **reboot** to use TFO properly: netsh int tcp set global fastopenfallback=disabled diff --git a/docker/mingw/Makefile b/docker/mingw/Makefile index 92c0122a..f3fdef38 100644 --- a/docker/mingw/Makefile +++ b/docker/mingw/Makefile @@ -20,6 +20,7 @@ REPO=shadowsocks REV=master +PLUGIN=true IMAGE=ss-build-mingw DIST=ss-libev-win-dist.tar.gz @@ -28,7 +29,8 @@ all: build build: docker build --force-rm -t $(IMAGE) \ --build-arg REV=$(REV) --build-arg REPO=$(REPO) \ - --build-arg REBUILD="$$(date +%Y-%m-%d-%H-%M-%S)" . + --build-arg REBUILD="$$(date +%Y-%m-%d-%H-%M-%S)" \ + --build-arg PLUGIN=$(PLUGIN) . docker run --rm --entrypoint cat $(IMAGE) /bin.tgz > $(DIST) clean: diff --git a/docker/mingw/build.sh b/docker/mingw/build.sh index da89871b..ed5beed0 100644 --- a/docker/mingw/build.sh +++ b/docker/mingw/build.sh @@ -47,6 +47,25 @@ build_proj() { make clean make LDFLAGS="-all-static -L${dep}/lib" make install-strip + + # Reference SIP003 plugin (Experimental) + [[ "${PLUGIN}" != "true" ]] && return 0 + + PLUGIN_URL=https://github.com/${PROJ_SITE}/simple-obfs.git + PLUGIN_REV=master + + cd "$SRC" + git clone ${PLUGIN_URL} plugin + cd plugin + git checkout ${PLUGIN_REV} + git submodule update --init + ./autogen.sh + ./configure --host=${host} --prefix=${prefix} \ + --disable-documentation \ + --with-ev="$dep" + make clean + make LDFLAGS="-all-static -L${dep}/lib" + make install-strip } dk_build() { @@ -65,6 +84,10 @@ dk_package() { cp ${DIST}/i686/bin/ss-${bin}.exe ss-${bin}-x86.exe cp ${DIST}/x86_64/bin/ss-${bin}.exe ss-${bin}-x64.exe done + for bin in local server; do + cp ${DIST}/i686/bin/obfs-${bin}.exe obfs-${bin}-x86.exe + cp ${DIST}/x86_64/bin/obfs-${bin}.exe obfs-${bin}-x64.exe + done pushd "$SRC/proj" GIT_REV="$(git rev-parse --short HEAD)" popd diff --git a/docker/mingw/make.bat b/docker/mingw/make.bat index 250dfa54..32078473 100644 --- a/docker/mingw/make.bat +++ b/docker/mingw/make.bat @@ -2,10 +2,12 @@ pushd %~dp0 set "REPO=shadowsocks" set "REV=master" +set "PLUGIN=true" set "IMAGE=ss-build-mingw" set "DIST=ss-libev-win-dist.tar.gz" docker build --force-rm -t %IMAGE% ^ --build-arg REV=%REV% --build-arg REPO=%REPO% ^ - --build-arg REBUILD=%RANDOM% . + --build-arg REBUILD=%RANDOM% ^ + --build-arg PLUGIN=%PLUGIN% . docker run --rm --entrypoint cat %IMAGE% /bin.tgz > %DIST% pause