-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Enhancement] Improve SwitchOmega rules importer #345
Labels
type-enhancement
Enhancement to existing feature
Comments
salarcode
added
type-new-feature
Adding a new feature
type-enhancement
Enhancement to existing feature
and removed
type-new-feature
Adding a new feature
labels
Feb 27, 2024
Samples:
{
"+__ruleListOf_auto switch": {
"name": "__ruleListOf_auto switch",
"defaultProfileName": "direct",
"profileType": "RuleListProfile",
"color": "#99dd99",
"format": "AutoProxy",
"matchProfileName": "direct",
"ruleList": "[AutoProxy 0.2.9]\n! Checksum: 9PVgZURV+9DlFwAZIld/ZQ\n! Expires: 6h\n! Title: GFWList4LL\n! GFWList with EVERYTHING included\n! Last Modified: Mon, 19 Feb 2024 10:27:32 -0500\n!\n! HomePage: https://github.com/gfwlist/gfwlist\n! License: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt\n!\n! GFWList is unlikely to fully comprise the real\n! rules being deployed inside GFW system. We try\n! our best to keep the list up to date. Please\n! contact us regarding URL submission / removal,\n! or suggestion / enhancement at issue tracker:\n! https://github.com/gfwlist/gfwlist/issues/.\n\n!---------403/451/503/520 & URL Redirects---------\n!--ehentai\n|http://85.17.73.31/\n!--||adorama.com\n||afreecatv.com\n||agnesb.fr\n||carfax.com\n.casinobellini.com",
"revision": "18deaa1e43f",
"sourceUrl": "http://127.0.0.1:9999/123.txt",
"lastUpdate": "2024-02-27T12:54:54.758Z"
},
"+auto switch": {
"profileType": "SwitchProfile",
"rules": [
{
"condition": {
"conditionType": "HostWildcardCondition",
"pattern": "internal.example.com"
},
"profileName": "direct"
},
{
"condition": {
"conditionType": "HostWildcardCondition",
"pattern": "*.example.com"
},
"profileName": "proxy"
}
],
"name": "auto switch",
"color": "#99dd99",
"defaultProfileName": "__ruleListOf_auto switch",
"revision": "18de3134b36"
},
"+proxy": {
"bypassList": [
{
"pattern": "127.0.0.1",
"conditionType": "BypassCondition"
},
{
"pattern": "::1",
"conditionType": "BypassCondition"
},
{
"pattern": "localhost",
"conditionType": "BypassCondition"
}
],
"profileType": "FixedProfile",
"name": "proxy",
"color": "#99ccee",
"fallbackProxy": {
"port": 8080,
"scheme": "http",
"host": "proxy.example.com"
}
},
"-addConditionsToBottom": false,
"-confirmDeletion": true,
"-downloadInterval": 1440,
"-enableQuickSwitch": false,
"-monitorWebRequests": true,
"-quickSwitchProfiles": [],
"-refreshOnProfileChange": true,
"-revertProxyChanges": true,
"-showExternalProfile": true,
"-showInspectMenu": true,
"-startupProfileName": "",
"schemaVersion": 2,
"+adsad": {
"profileType": "PacProfile",
"name": "adsad",
"pacScript": "function FindProxyForURL(url, host) {\n return \"DIRECT\";\n}",
"color": "#fa8",
"revision": "18de96672e5"
},
"+profile_default_direct": {
"profileType": "FixedProfile",
"name": "profile_default_direct",
"bypassList": [
{
"conditionType": "BypassCondition",
"pattern": "127.0.0.1"
},
{
"conditionType": "BypassCondition",
"pattern": "[::1]"
},
{
"conditionType": "BypassCondition",
"pattern": "localhost"
}
],
"color": "#47b",
"revision": "18deaa3b0d6",
"proxyForHttp": {
"scheme": "https",
"port": 443,
"host": "example.com"
},
"proxyForHttps": {
"scheme": "socks5",
"port": 1080,
"host": "example.com"
},
"proxyForFtp": {
"scheme": "http",
"port": 1080,
"host": "example.com"
}
},
"+pac_url": {
"profileType": "PacProfile",
"name": "pac_url",
"pacScript": "function FindProxyForURL(url, host) {\r\n return \"PROXY test.com:8080\";\r\n}",
"color": "#d497ee",
"revision": "18deaa504d6",
"pacUrl": "http://127.0.0.1:9999/pac.txt",
"lastUpdate": "2024-02-27T12:58:19.705Z"
},
"+virtualprofile": {
"profileType": "VirtualProfile",
"name": "virtualprofile",
"defaultProfileName": "profile_default_direct",
"rules": [],
"color": "#d497ee",
"revision": "18deaa59e87"
}
} |
I've came up with this rules file, from what I see so far the
|
Mentioning your good observations:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SwitchOmega rules importer needs work. Some info of previous discussions #286
The text was updated successfully, but these errors were encountered: