Add proxy routing and sing-box support

This commit is contained in:
Fabian Freund
2026-05-22 18:16:31 +02:00
parent 51289f1266
commit a5974617aa
262 changed files with 32003 additions and 3962 deletions
@@ -0,0 +1,25 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_singbox_proxy/flutter_singbox_proxy.dart';
void main() {
test('profile model keeps generic sing-box config boundary', () {
final profile = SingboxProxyProfile(
id: 'wg-home',
name: 'WireGuard Home',
type: SingboxProxyProfileType.wireguard,
configJson: '{"server":"example.test"}',
secretJson: '{"private_key":"secret"}',
);
expect(profile.id, 'wg-home');
expect(profile.type, SingboxProxyProfileType.wireguard);
expect(profile.secretJson, contains('private_key'));
});
test('runtime options default to blocking unmatched traffic', () {
final options = SingboxProxyRuntimeOptions();
expect(options.preferredBasePort, isNull);
expect(options.blockUnmatchedTraffic, isTrue);
});
}