mirror of
https://github.com/2dust/v2rayN.git
synced 2025-05-02 21:28:51 +00:00
Support hysteria and naiveproxy subscription
This commit is contained in:
parent
4e65732a4e
commit
19f9bff6fe
1 changed files with 29 additions and 4 deletions
|
@ -950,14 +950,39 @@ namespace v2rayN.Handler
|
||||||
vmessItem.address = fileName;
|
vmessItem.address = fileName;
|
||||||
vmessItem.remarks = "clash_custom";
|
vmessItem.remarks = "clash_custom";
|
||||||
}
|
}
|
||||||
|
//Is hysteria configuration
|
||||||
|
else if (clipboardData.IndexOf("server") >= 0
|
||||||
|
&& clipboardData.IndexOf("up") >= 0
|
||||||
|
&& clipboardData.IndexOf("down") >= 0
|
||||||
|
&& clipboardData.IndexOf("listen") >= 0)
|
||||||
|
{
|
||||||
|
var fileName = Utils.GetTempPath($"{Utils.GetGUID(false)}.json");
|
||||||
|
File.WriteAllText(fileName, clipboardData);
|
||||||
|
|
||||||
|
vmessItem.coreType = ECoreType.hysteria;
|
||||||
|
vmessItem.address = fileName;
|
||||||
|
vmessItem.remarks = "hysteria_custom";
|
||||||
|
}
|
||||||
|
//Is naiveproxy configuration
|
||||||
|
else if (clipboardData.IndexOf("listen") >= 0
|
||||||
|
&& clipboardData.IndexOf("proxy") >= 0)
|
||||||
|
{
|
||||||
|
var fileName = Utils.GetTempPath($"{Utils.GetGUID(false)}.json");
|
||||||
|
File.WriteAllText(fileName, clipboardData);
|
||||||
|
|
||||||
|
vmessItem.coreType = ECoreType.naiveproxy;
|
||||||
|
vmessItem.address = fileName;
|
||||||
|
vmessItem.remarks = "naiveproxy_custom";
|
||||||
|
}
|
||||||
//Is Other configuration
|
//Is Other configuration
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var fileName = Utils.GetTempPath($"{Utils.GetGUID(false)}.txt");
|
return -1;
|
||||||
File.WriteAllText(fileName, clipboardData);
|
//var fileName = Utils.GetTempPath($"{Utils.GetGUID(false)}.txt");
|
||||||
|
//File.WriteAllText(fileName, clipboardData);
|
||||||
|
|
||||||
vmessItem.address = fileName;
|
//vmessItem.address = fileName;
|
||||||
vmessItem.remarks = "other_custom";
|
//vmessItem.remarks = "other_custom";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Utils.IsNullOrEmpty(subid))
|
if (!Utils.IsNullOrEmpty(subid))
|
||||||
|
|
Loading…
Reference in a new issue