-
Notifications
You must be signed in to change notification settings - Fork 789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
无法关闭系统代理 #811
Comments
定位到了问题: class VpnSystemProxyItem extends StatelessWidget {
const VpnSystemProxyItem({super.key});
@override
Widget build(BuildContext context) {
return Selector<Config, bool>(
selector: (_, config) => config.vpnProps.systemProxy,
builder: (_, systemProxy, __) {
return ListItem.switchItem(
title: Text(appLocalizations.systemProxy),
subtitle: Text(appLocalizations.systemProxyDesc),
delegate: SwitchDelegate(
value: systemProxy,
onChanged: (bool value) async {
final config = globalState.appController.config;
final vpnProps = config.vpnProps;
config.vpnProps = vpnProps.copyWith(
systemProxy: value,
);
// 如果关闭系统代理
if (!value) {
config.networkProps = config.networkProps.copyWith(
systemProxy: false,
);
}
},
),
);
},
);
}
}
class SystemProxyItem extends StatelessWidget {
const SystemProxyItem({super.key});
@override
Widget build(BuildContext context) {
return Selector<Config, bool>(
selector: (_, config) => config.networkProps.systemProxy,
builder: (_, systemProxy, __) {
return ListItem.switchItem(
title: Text(appLocalizations.systemProxy),
subtitle: Text(appLocalizations.systemProxyDesc),
delegate: SwitchDelegate(
value: systemProxy,
onChanged: (bool value) async {
final config = globalState.appController.config;
final networkProps = config.networkProps;
config.networkProps = networkProps.copyWith(
systemProxy: value,
);
// 如果关闭系统代理
if (Platform.isAndroid && !value) {
config.vpnProps = config.vpnProps.copyWith(
systemProxy: false,
);
}
},
),
);
},
);
}
} 希望开发者可以检查一下。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
在「覆写」-「网络」-「重置」,点击重置之后,开关「系统代理」无效。「系统代理」一直保持开启状态。
判断依据:在不开启「系统代理」的情况下,YouTube的视频是通过udp加载的,开启之后则是通过tcp连接的。
The text was updated successfully, but these errors were encountered: