Clean build scripts

This commit is contained in:
Hellojack
2022-06-07 09:15:10 +08:00
committed by GitHub
parent 2a1b2bbffc
commit 661e53d553
10 changed files with 4 additions and 126 deletions

View File

@@ -196,17 +196,17 @@ public static class V2rayConfigUtils
var streamSettings = new StreamSettings
{
network = "tcp",
security = server.TLSSecureType
security = trojan.TLSSecureType
};
if (server.TLSSecureType != "none")
if (trojan.TLSSecureType != "none")
{
var tlsSettings = new TlsSettings
{
allowInsecure = Global.Settings.V2RayConfig.AllowInsecure,
serverName = server.Host ?? ""
serverName = trojan.Host ?? ""
};
switch (server.TLSSecureType)
switch (trojan.TLSSecureType)
{
case "tls":
outbound.streamSettings.tlsSettings = tlsSettings;

View File

@@ -1,10 +0,0 @@
Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent)
git clone https://github.com/shadowsocks/libev -b 'mingw' src
if ( -Not $? ) {
exit $lastExitCode
}
Set-Location src
msys2 ..\build.sh
exit $lastExitCode

View File

@@ -1,7 +0,0 @@
#!/usr/bin/env bash
mkdir -p "${PWD}/../../build"
./configure --prefix="${PWD}/../../build" || exit $?
make install -j2
exit $?

View File

@@ -1,15 +0,0 @@
Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent)
git clone https://github.com/shadowsocks/shadowsocks-rust -b 'v1.12.0' src
if ( -Not $? ) {
exit $lastExitCode
}
Set-Location src
cargo build --features logging,trust-dns,local,utility,local-http,local-tunnel,local-socks4,multi-threaded,stream-cipher --release
if ( -Not $? ) {
exit $lastExitCode
}
cp -Force '.\target\release\sslocal.exe' '..\..\release\Shadowsocks.exe'
exit 0

View File

@@ -1,15 +0,0 @@
Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent)
git clone https://github.com/shadowsocksrr/shadowsocksr-libev -b 'Akkariiin/develop' src
if ( -Not $? ) {
exit $lastExitCode
}
Set-Location src
msys2 ..\build.sh
if ( -Not $? ) {
exit $lastExitCode
}
cp -Force '.\ss-local.exe' '..\..\release\ShadowsocksR.exe'
exit 0

View File

@@ -1,20 +0,0 @@
#!/usr/bin/env bash
git submodule update --init || exit $?
cd libudns
./autogen.sh || exit $?
./configure || exit $?
make -j2 || exit $?
cd ..
./autogen.sh || exit $?
CFLAGS+="-fstack-protector" ./configure --disable-documentation --with-ev="${PWD}/../../build" || exit $?
sed -i "s/%I/%z/g" src/utils.h
sed -i "s/^const/extern const/g" src/tls.h
sed -i "s/^const/extern const/g" src/http.h
make -j2 || exit $?
gcc $(find src/ -name "ss_local-*.o") $(find . -name "*.a" ! -name "*.dll.a") "${PWD}/../../build/lib/libev.a" -o ss-local -fstack-protector -static -lpcre -lssl -lcrypto -lws2_32 -s
exit $?

View File

@@ -1,15 +0,0 @@
Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent)
git clone https://github.com/shadowsocks/simple-obfs src
if ( -Not $? ) {
exit $lastExitCode
}
Set-Location src
msys2 ..\build.sh
if ( -Not $? ) {
exit $lastExitCode
}
cp -Force '.\obfs-local.exe' '..\..\release\simple-obfs.exe'
exit 0

View File

@@ -1,10 +0,0 @@
#!/usr/bin/env bash
git submodule update --init || exit $?
./autogen.sh || exit $?
./configure --disable-documentation --with-ev="${PWD}/../../build" || exit $?
make -j2 || exit $?
gcc $(find src/ -name "obfs_local-*.o") $(find . -name "*.a" ! -name "*.dll.a") "${PWD}/../../build/lib/libev.a" -o obfs-local -fstack-protector -static -lws2_32 -s
exit $?

View File

@@ -1,15 +0,0 @@
Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent)
git clone https://github.com/p4gefau1t/trojan-go -b 'v0.10.6' src
if ( -Not $? ) {
exit $lastExitCode
}
Set-Location src
$Env:CGO_ENABLED='0'
$Env:GOROOT_FINAL='/usr'
$Env:GOOS='windows'
$Env:GOARCH='amd64'
go build -a -trimpath -asmflags '-s -w' -ldflags '-s -w' -tags 'full' -o '..\..\release\Trojan.exe'
exit $lastExitCode

View File

@@ -1,15 +0,0 @@
Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent)
git clone https://github.com/teddysun/xray-plugin -b 'v1.5.6' src
if ( -Not $? ) {
exit $lastExitCode
}
Set-Location src
$Env:CGO_ENABLED='0'
$Env:GOROOT_FINAL='/usr'
$Env:GOOS='windows'
$Env:GOARCH='amd64'
go build -a -trimpath -asmflags '-s -w' -ldflags '-s -w' -o '..\..\release\xray-plugin.exe'
exit $lastExitCode