Files
ReVoltVPN/test/xray_socks_schema_test.dart
T
Naveax 6c99366602 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.
2026-08-31 19:47:05 +03:00

19 lines
701 B
Dart

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")')));
});
}