mirror of
https://github.com/benbusby/farside.git
synced 2025-03-13 10:46:35 -04:00
Add missing handling for 4get and LibreY, remove LibreX
This commit is contained in:
parent
4b19ad5228
commit
f3ab726cec
6
.github/workflows/update-instances.yml
vendored
6
.github/workflows/update-instances.yml
vendored
@ -251,12 +251,6 @@ jobs:
|
||||
.clearnet] |
|
||||
sort' > librey-tmp.json
|
||||
|
||||
jq --slurpfile librex librey-tmp.json \
|
||||
'( .[] | select(.type == "librex") )
|
||||
.instances |= $librex[0]' services-full.json > services-tmp.json
|
||||
|
||||
mv services-tmp.json services-full.json
|
||||
|
||||
jq --slurpfile librey librey-tmp.json \
|
||||
'( .[] | select(.type == "librey") )
|
||||
.instances |= $librey[0]' services-full.json > services-tmp.json
|
||||
|
@ -86,8 +86,9 @@ func routing(w http.ResponseWriter, r *http.Request, jsEnabled bool, query strin
|
||||
|
||||
target, err := services.MatchRequest(segments[0])
|
||||
if err != nil {
|
||||
errMsg := fmt.Sprintf("No routing found for '%s'", segments[0])
|
||||
log.Printf("Error during match request: %v\n", err)
|
||||
http.Error(w, "No routing found for "+target, http.StatusBadRequest)
|
||||
http.Error(w, errMsg, http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -396,29 +396,6 @@
|
||||
"https://cringe.whateveritworks.org"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "librex",
|
||||
"test_url": "/search.php?q=<%=query%>",
|
||||
"fallback": "https://librex.myroware.eu",
|
||||
"instances": [
|
||||
"https://libre.blitzw.in",
|
||||
"https://librex.nohost.network",
|
||||
"https://librey.4o1x5.dev",
|
||||
"https://librey.baczek.me",
|
||||
"https://librey.darkness.services",
|
||||
"https://librey.nube-gran.de",
|
||||
"https://librey.org",
|
||||
"https://librey.sny.sh",
|
||||
"https://ly.owo.si",
|
||||
"https://search.davidovski.xyz",
|
||||
"https://search.funami.tech",
|
||||
"https://search.liv.town",
|
||||
"https://search.revvy.de",
|
||||
"https://search.technicalvoid.dev",
|
||||
"https://search.uwabaki.party",
|
||||
"https://serp.catswords.net"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "quetre",
|
||||
"test_url": "/How-does-the-Z-boson-decay",
|
||||
|
@ -366,29 +366,6 @@
|
||||
"https://cringe.whateveritworks.org"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "librex",
|
||||
"test_url": "/search.php?q=<%=query%>",
|
||||
"fallback": "https://librex.myroware.eu",
|
||||
"instances": [
|
||||
"https://libre.blitzw.in",
|
||||
"https://librex.nohost.network",
|
||||
"https://librey.4o1x5.dev",
|
||||
"https://librey.baczek.me",
|
||||
"https://librey.darkness.services",
|
||||
"https://librey.nube-gran.de",
|
||||
"https://librey.org",
|
||||
"https://librey.sny.sh",
|
||||
"https://ly.owo.si",
|
||||
"https://search.davidovski.xyz",
|
||||
"https://search.funami.tech",
|
||||
"https://search.liv.town",
|
||||
"https://search.revvy.de",
|
||||
"https://search.technicalvoid.dev",
|
||||
"https://search.uwabaki.party",
|
||||
"https://serp.catswords.net"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "quetre",
|
||||
"test_url": "/How-does-the-Z-boson-decay",
|
||||
|
@ -97,6 +97,20 @@ var regexMap = []RegexMapping{
|
||||
Pattern: regexp.MustCompile(`genius\.com|dumb`),
|
||||
Targets: []string{"dumb"},
|
||||
},
|
||||
{
|
||||
// 4get
|
||||
// Note: Could be used for redirecting other search engine
|
||||
// requests, but would need special handling
|
||||
Pattern: regexp.MustCompile("4get"),
|
||||
Targets: []string{"4get"},
|
||||
},
|
||||
{
|
||||
// LibreY
|
||||
// Note: Could be used for redirecting other search engine
|
||||
// requests, but would need special handling
|
||||
Pattern: regexp.MustCompile("librex|librey"),
|
||||
Targets: []string{"librey"},
|
||||
},
|
||||
}
|
||||
|
||||
func MatchRequest(service string) (string, error) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user