Browse Source

⚠ Warn when importing from legacy ss:// links

tags/4.4.0.0^0
database64128 4 years ago
parent
commit
ac0fcdfc8c
No known key found for this signature in database GPG Key ID: 1CA27546BEDB8B01
4 changed files with 8 additions and 4 deletions
  1. +1
    -0
      CHANGES
  2. +2
    -0
      shadowsocks-csharp/Controller/ShadowsocksController.cs
  3. +1
    -0
      shadowsocks-csharp/Data/i18n.csv
  4. +4
    -4
      shadowsocks-csharp/Model/Server.cs

+ 1
- 0
CHANGES View File

@@ -1,5 +1,6 @@
4.4.0.0 2021-01-01
- Security: remove infrastructure of stream ciphers (#3048)
- Show warning message when importing from deprecated legacy ss:// links.
- Other minor bug fixes and improvements
4.3.3.0 2020-12-07


+ 2
- 0
shadowsocks-csharp/Controller/ShadowsocksController.cs View File

@@ -450,6 +450,8 @@ namespace Shadowsocks.Controller
foreach (var server in servers)
{
_config.configs.Add(server);
if (server.warnLegacyUrl)
MessageBox.Show(I18N.GetString("Warning: importing {0} from a legacy ss:// link. Support for legacy ss:// links will be dropped in version 5. Make sure to update your ss:// links.", server.ToString()));
}
_config.index = _config.configs.Count - 1;
SaveConfig(_config);


+ 1
- 0
shadowsocks-csharp/Data/i18n.csv View File

@@ -133,6 +133,7 @@ Failed to update registry,Не удалось обновить запись в
Import from URL: {0} ?,импортировать из адреса: {0} ?,从URL导入: {0} ?,從URL匯入: {0} ?,{0}:このURLからインポートしますか?,,
Successfully imported from {0},Успешно импортировано из {0},导入成功:{0},導入成功:{0},{0}:インポートしました。,,
Failed to import. Please check if the link is valid.,,导入失败,请检查链接是否有效。,導入失敗,請檢查鏈接是否有效。,インポートに失敗しました。リンクの有効性を確認してください。,,
Warning: importing {0} from a legacy ss:// link. Support for legacy ss:// links will be dropped in version 5. Make sure to update your ss:// links.,,警告: 正在从旧版 ss:// 链接导入 {0}。对旧版 ss:// 链接的支持将于 v5 移除,请及时更新你的链接。,,,,
System Proxy On: ,Системный прокси:,系统代理已启用:,系統 Proxy 已啟用:,システム プロキシが有効:,시스템 프록시 활성화됨: ,Proxy système activé:
Running: Port {0},Запущен на порту {0},正在运行:端口 {0},正在執行:連接埠號碼 {0},実行中:ポート {0},실행 중: 포트 {0}번,En cours d'exécution: port {0}
"Unexpected error, shadowsocks will exit. Please report to","Непредвиденная ошибка, пожалуйста сообщите на",非预期错误,Shadowsocks将退出。请提交此错误到,非預期錯誤,Shadowsocks 將結束。請報告此錯誤至,予想外のエラーが発生したため、Shadowsocks を終了します。詳しくは下記までお問い合わせ下さい:,알 수 없는 오류로 Shadowsocks가 종료될 것입니다. 오류를 여기로 제보해주세요:,Shadowsocks va quitter en présence d/érreur inattendue. Veuillez signaler à


+ 4
- 4
shadowsocks-csharp/Model/Server.cs View File

@@ -29,10 +29,6 @@ namespace Shadowsocks.Model
public int server_port;
public string password;
public string method;
// optional fields
[DefaultValue("")]
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
@@ -53,6 +49,9 @@ namespace Shadowsocks.Model
public int timeout;
// Set to true when imported from a legacy ss:// URL.
public bool warnLegacyUrl;
public override int GetHashCode()
{
return server.GetHashCode() ^ server_port;
@@ -177,6 +176,7 @@ namespace Shadowsocks.Model
server.password = details.Groups["password"].Value;
server.server = details.Groups["hostname"].Value;
server.server_port = int.Parse(details.Groups["port"].Value);
server.warnLegacyUrl = true;
return server;
}


Loading…
Cancel
Save