-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
291 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using v2rayN.Enums; | ||
using v2rayN.Models; | ||
|
||
namespace v2rayN.Handler.Fmt | ||
{ | ||
internal class ClashFmt : BaseFmt | ||
{ | ||
public static ProfileItem? ResolveFull(string strData, string? subRemarks) | ||
{ | ||
if (Contains(strData, "port", "socks-port", "proxies")) | ||
{ | ||
var fileName = WriteAllText(strData, "yaml"); | ||
|
||
var profileItem = new ProfileItem | ||
{ | ||
coreType = ECoreType.mihomo, | ||
address = fileName, | ||
remarks = subRemarks ?? "clash_custom" | ||
}; | ||
return profileItem; | ||
} | ||
|
||
return null; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using v2rayN.Enums; | ||
using v2rayN.Models; | ||
|
||
namespace v2rayN.Handler.Fmt | ||
{ | ||
internal class NaiveproxyFmt : BaseFmt | ||
{ | ||
public static ProfileItem? ResolveFull(string strData, string? subRemarks) | ||
{ | ||
if (Contains(strData, "listen", "proxy", "<html>", "<body>")) | ||
{ | ||
var fileName = WriteAllText(strData); | ||
|
||
var profileItem = new ProfileItem | ||
{ | ||
coreType = ECoreType.naiveproxy, | ||
address = fileName, | ||
remarks = subRemarks ?? "naiveproxy_custom" | ||
}; | ||
return profileItem; | ||
} | ||
|
||
return null; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.