Skip to content

Commit

Permalink
add ReducedIvHeadEntropy feature to shadowsocks 2022
Browse files Browse the repository at this point in the history
  • Loading branch information
maskedeken committed May 1, 2023
1 parent 342a7c9 commit fb09d7b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 10 deletions.
4 changes: 2 additions & 2 deletions app_xray/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ setupAll()
android {
defaultConfig {
applicationId = "moe.matsuri.plugin.xray"
versionCode = 15
versionName = "v1.8.1"
versionCode = 16
versionName = "v1.8.1-1"
}
}
12 changes: 4 additions & 8 deletions download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,10 @@ download_xray() {
VERSION="v1.8.1"
mkdir_libs "app_xray/libs"

curl -Lso xray.zip "https://github.com/XTLS/Xray-core/releases/download/$VERSION/Xray-android-arm64-v8a.zip"
unzip_xray arm64-v8a
curl -Lso xray.zip "https://github.com/XTLS/Xray-core/releases/download/$VERSION/Xray-linux-arm32-v7a.zip"
unzip_xray armeabi-v7a
curl -Lso xray.zip "https://github.com/XTLS/Xray-core/releases/download/$VERSION/Xray-linux-32.zip"
unzip_xray x86
curl -Lso xray.zip "https://github.com/XTLS/Xray-core/releases/download/$VERSION/Xray-linux-64.zip"
unzip_xray x86_64
dl_and_chmod arm64-v8a/libxray.so "https://github.com/maskedeken/Xray-core/releases/download/$VERSION/xray-android-arm64"
dl_and_chmod armeabi-v7a/libxray.so "https://github.com/maskedeken/Xray-core/releases/download/$VERSION/xray-android-arm"
dl_and_chmod x86_64/libxray.so "https://github.com/maskedeken/Xray-core/releases/download/$VERSION/xray-android-x64"
dl_and_chmod x86/libxray.so "https://github.com/maskedeken/Xray-core/releases/download/$VERSION/xray-android-x86"
}

download_singbox() {
Expand Down
7 changes: 7 additions & 0 deletions js/common/translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,13 @@ export var translates = {
spiderX: {
"": "SpiderX",
},
reducedIvHeadEntropy: {
"": "ReducedIvHeadEntropy",
},
reducedIvHeadEntropy_summary: {
"zh_CN": "这是 GFWReport 针对 GFW 上观察到的类似随机流的协议阻塞行为提出的对策。 这个选项将 IV 的前 6 个字节重新映射为可打印的字符,启用后,特权网络路径上的任何人都有可能识别该协议。",
"": "This is GFWReport's proposal for a countermeasure for the random stream like protocol blocking behaviour observed on GFW. This option remap the first 6 bytes of IV to printable characters, it's possible for anyone on the privileged network path to identify the protocol when enabled.",
},

// Brook
serverProtocol: {
Expand Down
9 changes: 9 additions & 0 deletions js/plugin_xray/ss2022.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ class ss2022Class {
this.defaultSharedStorage.serverPassword = ""
// UDP over TCP
this.defaultSharedStorage.serverUoT = false
// reduce IV header entropy
this.defaultSharedStorage.reducedIvHeadEntropy = false

for (var k in this.defaultSharedStorage) {
let v = this.defaultSharedStorage[k]
Expand Down Expand Up @@ -83,6 +85,12 @@ class ss2022Class {
"key": "serverUoT",
"icon": "baseline_wrap_text_24",
},
{
"type": "SwitchPreference",
"icon": "ic_baseline_grid_3x3_24",
"key": "reducedIvHeadEntropy",
"summary": TR("reducedIvHeadEntropy_summary")
},
]
}
]
Expand Down Expand Up @@ -150,6 +158,7 @@ class ss2022Class {
"method": ss.serverMethod,
"password": ss.serverPassword,
"uot": ss.serverUoT,
"reducedIvHeadEntropy": ss.reducedIvHeadEntropy,
}
]
}
Expand Down

0 comments on commit fb09d7b

Please sign in to comment.