Skip to content

卫月启动器添加代理设置功能 - #45

Open
Errerer wants to merge 19 commits into
AtmoOmen:CNfrom
Errerer:CN
Open

Errerer wants to merge 19 commits into
AtmoOmen:CNfrom
Errerer:CN

Conversation

@Errerer

@Errerer Errerer commented Sep 14, 2026

Copy link
Copy Markdown

No description provided.

@AtmoOmen AtmoOmen left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请勿让代理配置绕开原有的配置体系,目前整个代理系统都游离于其他系统之外。

Comment thread src/XIVLauncher/Windows/SettingsWindow.xaml.cs Outdated
@Errerer

Errerer commented Sep 15, 2026

Copy link
Copy Markdown
Author

配置已并入主配置、入口已移入 VM、保存即生效

@AtmoOmen AtmoOmen left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 不要包含“西红柿炒鸡蛋(没有红烧肉版)”式注释。
  2. 测试内容没有什么意义,请删除。

/// </summary>
public static class XLProxyProvider
{
public static IWebProxy? Current { get; private set; }

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

读取点全部发生在构造期,你 Apply 了又没有对那些依赖注入的进行更新,它们拿到的还全都是旧的对象。

/// 代理配置现已并入启动器主配置 (LauncherSettingsV3) 的统一存储体系,
/// 启动时自动导入旧文件, 导入成功后删除旧文件。
/// </summary>
public static class ProxySettingsMigration

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

删除。

Comment on lines +118 to +119
if (!string.IsNullOrEmpty(passwordInput))
profile.SetPassword(passwordInput);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

用户无法清空已设置密码。

Comment on lines +135 to +137
<xctk:IntegerUpDown Margin="0,4,0,16" Width="140" Minimum="1" Maximum="65535"
Value="{Binding SelectedProfile.ProxyPort, UpdateSourceTrigger=PropertyChanged}"
Padding="4" />

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

未套用深色样式

Comment on lines +46 to +53
public static string GetProxyConfigPath() =>
Path.Join(RoamingPath, "proxyConfigV3.json");

/// <summary>
/// 旧版代理配置路径 (启动器安装目录), 用于首次迁移到 Roaming
/// </summary>
public static string GetLegacyProxyConfigPath() =>
Path.Join(AppContext.BaseDirectory, "proxyConfigV3.json");

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

移除

Comment on lines +9 to +23
public sealed record ProxyConfigSnapshot
(
string Type,
string Host,
int Port,
string? Username = null,
string? Password = null
)
{
public bool IsDisabled =>
string.IsNullOrWhiteSpace(Host)
|| Port is < 1 or > 65535
|| string.IsNullOrWhiteSpace(Type)
|| string.Equals(Type, "None", StringComparison.OrdinalIgnoreCase);
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请拆分为单独的文件

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants