a5aea9438a
TDD: 先加守护测试(断言 kApiBaseUrl 走 https 且不含硬编码 IP),确认失败后 再改 api_config.dart 默认值 + 去掉 AndroidManifest 的 usesCleartextTraffic。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013nMthbVEmQquxBRKb9Fj8u
12 lines
466 B
Dart
12 lines
466 B
Dart
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:pangolin_vpn/services/api_config.dart';
|
|
|
|
void main() {
|
|
test('控制面基址默认走 https(禁止回退明文 http)', () {
|
|
expect(kApiBaseUrl, startsWith('https://'),
|
|
reason: '控制面已迁 CF Tunnel(api.yanmeiai.com);默认值不得是明文 http');
|
|
expect(kApiBaseUrl, isNot(contains('103.119.13.48')),
|
|
reason: '不得再硬编码节点 IP 作控制面基址');
|
|
});
|
|
}
|