Fix VPN internet connectivity and simplify client setup
Initialize Android physical interfaces and preserve macOS scoped routes. Add redacted diagnostics, default DNS, ordered auto-save, simplified controls, scanner rotation settings, and native regression coverage. Restore vendored build sources and document validation and stability checks.
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:meshport_lab/features/runtime_diagnostics.dart';
|
||||
|
||||
void main() {
|
||||
test('diagnostics redact nested credentials and retain replaced secrets', () {
|
||||
final redactor = DiagnosticRedactor();
|
||||
redactor.remember({
|
||||
'network_secret': 'mesh-secret',
|
||||
'nodes': [
|
||||
{
|
||||
'options': {
|
||||
'username': 'proxy-user',
|
||||
'password': 'proxy-password',
|
||||
'uuid': '00000000-0000-0000-0000-000000000001',
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
redactor.remember({'password': 'replacement-password'});
|
||||
final text = redactor.sanitize(
|
||||
'mesh-secret proxy-user proxy-password replacement-password '
|
||||
'00000000-0000-0000-0000-000000000001 '
|
||||
'socks://other-user:other-pass@proxy.example:1080 '
|
||||
'https://example.test/sub?token=subscription-secret',
|
||||
);
|
||||
for (final secret in [
|
||||
'mesh-secret',
|
||||
'proxy-user',
|
||||
'proxy-password',
|
||||
'replacement-password',
|
||||
'00000000-0000-0000-0000-000000000001',
|
||||
'other-user',
|
||||
'other-pass',
|
||||
'subscription-secret',
|
||||
]) {
|
||||
expect(text, isNot(contains(secret)));
|
||||
}
|
||||
expect(text, contains('proxy.example:1080'));
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user