branding fixes
This commit is contained in:
+3
-1
@@ -19,6 +19,8 @@
|
||||
*/
|
||||
import 'package:flutter_singbox_proxy/flutter_singbox_proxy.dart';
|
||||
|
||||
import 'package:weblibre/core/branding/proxy_brands.dart';
|
||||
|
||||
extension SingboxProxyProfileTypeExt on SingboxProxyProfileType {
|
||||
/// Long human label for menus, dialogs, subtitles.
|
||||
String get label => switch (this) {
|
||||
@@ -33,7 +35,7 @@ extension SingboxProxyProfileTypeExt on SingboxProxyProfileType {
|
||||
SingboxProxyProfileType.hysteria2 => 'Hysteria2',
|
||||
SingboxProxyProfileType.tuic => 'TUIC',
|
||||
SingboxProxyProfileType.ssh => 'SSH',
|
||||
SingboxProxyProfileType.wireguard => 'WireGuard',
|
||||
SingboxProxyProfileType.wireguard => wireGuardBrand,
|
||||
SingboxProxyProfileType.shadowTls => 'ShadowTLS',
|
||||
SingboxProxyProfileType.anyTls => 'AnyTLS',
|
||||
SingboxProxyProfileType.customOutbound => 'Custom Outbound',
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
*/
|
||||
import 'package:fast_equatable/fast_equatable.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:weblibre/core/branding/proxy_brands.dart';
|
||||
import 'package:weblibre/core/logger.dart';
|
||||
import 'package:weblibre/features/proxy/data/models/singbox_proxy_profile.dart';
|
||||
import 'package:weblibre/features/proxy/data/proxy_connection.dart';
|
||||
@@ -61,8 +62,8 @@ List<ProxyConnectionOption> proxyConnectionOptions(Ref ref) {
|
||||
return [
|
||||
ProxyConnectionOption(
|
||||
id: const TorProxyConnectionId(),
|
||||
title: 'Tor',
|
||||
subtitle: 'Route through the Tor network',
|
||||
title: torBrand,
|
||||
subtitle: 'Route through the $torNetworkLabel',
|
||||
),
|
||||
for (final profile in singboxProfiles)
|
||||
ProxyConnectionOption(
|
||||
|
||||
@@ -22,6 +22,7 @@ import 'dart:async';
|
||||
import 'package:flutter_mozilla_components/flutter_mozilla_components.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:synchronized/synchronized.dart';
|
||||
import 'package:weblibre/core/branding/proxy_brands.dart';
|
||||
import 'package:weblibre/features/geckoview/features/tabs/data/models/site_assignment.dart';
|
||||
import 'package:weblibre/features/proxy/data/proxy_connection.dart';
|
||||
|
||||
@@ -57,7 +58,7 @@ class ContainerProxyRepository extends _$ContainerProxyRepository {
|
||||
return _service.upsertProxy(
|
||||
GeckoProxySettings(
|
||||
id: const TorProxyConnectionId().encode(),
|
||||
title: 'Tor',
|
||||
title: torBrand,
|
||||
type: 'socks',
|
||||
host: '127.0.0.1',
|
||||
port: port,
|
||||
|
||||
@@ -22,6 +22,7 @@ import 'dart:convert';
|
||||
import 'package:file_picker/file_picker.dart';
|
||||
import 'package:flutter_singbox_proxy/flutter_singbox_proxy.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:weblibre/core/branding/proxy_brands.dart';
|
||||
import 'package:weblibre/core/logger.dart';
|
||||
import 'package:weblibre/features/proxy/data/forms/singbox_form_specs.dart';
|
||||
import 'package:weblibre/features/proxy/data/models/proxy_profile_seed.dart';
|
||||
@@ -70,8 +71,8 @@ class ProxyInputConsumer extends _$ProxyInputConsumer {
|
||||
|
||||
if (_looksLikeWireguardConf(trimmed)) {
|
||||
return _seedOutcome(
|
||||
() => _seedFromWireguardConf(trimmed, fileName: 'WireGuard'),
|
||||
logMessage: 'Failed to parse WireGuard configuration',
|
||||
() => _seedFromWireguardConf(trimmed, fileName: wireGuardBrand),
|
||||
logMessage: 'Failed to parse $wireGuardBrand configuration',
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter_singbox_proxy/flutter_singbox_proxy.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:socks5_proxy/socks_client.dart';
|
||||
import 'package:weblibre/core/branding/proxy_brands.dart';
|
||||
import 'package:weblibre/features/proxy/data/proxy_connection.dart';
|
||||
import 'package:weblibre/features/proxy/domain/repositories/singbox_proxy_runtime.dart';
|
||||
import 'package:weblibre/features/tor/domain/extensions/tor_status_x.dart';
|
||||
@@ -118,7 +119,7 @@ class ProxyLatencyResults extends _$ProxyLatencyResults {
|
||||
if (socksPort == null) {
|
||||
_set(
|
||||
const TorProxyConnectionId(),
|
||||
AsyncError('Tor is not ready', StackTrace.current),
|
||||
AsyncError('$torBrand is not ready', StackTrace.current),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user