test(app): cover routing and secure socks migrations
Cover legacy Auto and ASS preference migration, authenticated SOCKS session generation and the stock-runtime Xray SOCKS schema so future runtime changes cannot silently restore the old fixed-port/no-auth behavior.
This commit is contained in:
1 parent
8ead3ff249
commit
6c99366602
4 files changed
+140
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
test('stock runtime patch validates the current SOCKS5 users schema', () {
|
||||
final source = File(
|
||||
'tool/patch_flutter_vless_secure_socks_v2.dart',
|
||||
).readAsStringSync();
|
||||
|
||||
expect(source, contains('settings.optJSONArray("users")'));
|
||||
expect(source, contains('settings.optString("auth") != "password"'));
|
||||
expect(source, contains('inbound.optString("listen") != "127.0.0.1"'));
|
||||
expect(source, contains('account.optString("user").isEmpty()'));
|
||||
expect(source, contains('account.optString("pass").isEmpty()'));
|
||||
expect(source, isNot(contains('settings.optJSONArray("accounts")')));
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user