@@ -54,11 +54,6 @@ public abstract class StandardV2RayBean extends AbstractBean {
54
54
55
55
public String echConfig ;
56
56
57
- // sing-box 不再使用
58
- public Boolean enablePqSignature ;
59
-
60
- public Boolean disabledDRS ;
61
-
62
57
// --------------------------------------- Mux
63
58
64
59
public Boolean enableMux ;
@@ -108,8 +103,6 @@ public void initializeDefaultValues() {
108
103
109
104
if (enableECH == null ) enableECH = false ;
110
105
if (JavaUtil .isNullOrBlank (echConfig )) echConfig = "" ;
111
- if (enablePqSignature == null ) enablePqSignature = false ;
112
- if (disabledDRS == null ) disabledDRS = false ;
113
106
114
107
if (enableMux == null ) enableMux = false ;
115
108
if (muxPadding == null ) muxPadding = false ;
@@ -119,7 +112,7 @@ public void initializeDefaultValues() {
119
112
120
113
@ Override
121
114
public void serialize (ByteBufferOutput output ) {
122
- output .writeInt (2 );
115
+ output .writeInt (3 );
123
116
super .serialize (output );
124
117
output .writeString (uuid );
125
118
output .writeString (encryption );
@@ -167,11 +160,7 @@ public void serialize(ByteBufferOutput output) {
167
160
}
168
161
169
162
output .writeBoolean (enableECH );
170
- if (enableECH ) {
171
- output .writeBoolean (enablePqSignature );
172
- output .writeBoolean (disabledDRS );
173
- output .writeString (echConfig );
174
- }
163
+ output .writeString (echConfig );
175
164
176
165
output .writeInt (packetEncoding );
177
166
@@ -229,16 +218,18 @@ public void deserialize(ByteBufferInput input) {
229
218
realityShortId = input .readString ();
230
219
}
231
220
232
- if (version >= 1 ) { // 从老版本升级上来
221
+ if (version >= 1 ) {
233
222
enableECH = input .readBoolean ();
234
- if (enableECH ) {
235
- enablePqSignature = input .readBoolean ();
236
- disabledDRS = input .readBoolean ();
223
+ if (version >= 3 ) {
237
224
echConfig = input .readString ();
225
+ } else {
226
+ if (enableECH ) {
227
+ input .readBoolean ();
228
+ input .readBoolean ();
229
+ echConfig = input .readString ();
230
+ }
238
231
}
239
- }
240
-
241
- if (version == 0 ) {
232
+ } else if (version == 0 ) {
242
233
// 从老版本升级上来但是 version == 0, 可能有 enableECH 也可能没有,需要做判断
243
234
int position = input .getByteBuffer ().position (); // 当前位置
244
235
@@ -250,8 +241,8 @@ public void deserialize(ByteBufferInput input) {
250
241
if (tmpPacketEncoding != 1 && tmpPacketEncoding != 2 ) {
251
242
enableECH = tmpEnableECH ;
252
243
if (enableECH ) {
253
- enablePqSignature = input .readBoolean ();
254
- disabledDRS = input .readBoolean ();
244
+ input .readBoolean ();
245
+ input .readBoolean ();
255
246
echConfig = input .readString ();
256
247
}
257
248
} // 否则后一位就是 packetEncoding
@@ -275,7 +266,6 @@ public void applyFeatureSettings(AbstractBean other) {
275
266
bean .utlsFingerprint = utlsFingerprint ;
276
267
bean .packetEncoding = packetEncoding ;
277
268
bean .enableECH = enableECH ;
278
- bean .disabledDRS = disabledDRS ;
279
269
bean .echConfig = echConfig ;
280
270
bean .enableMux = enableMux ;
281
271
bean .muxPadding = muxPadding ;
0 commit comments