2024-06-09 01:35:51 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"net/http"
|
|
|
|
)
|
|
|
|
|
|
|
|
var redirects map[string][]string
|
|
|
|
|
|
|
|
func HandleWebfinger(w http.ResponseWriter, req *http.Request) {
|
|
|
|
olduser := req.URL.Query().Get("resource")[5:]
|
|
|
|
newuser, ok := redirects[olduser]
|
|
|
|
if !ok {
|
|
|
|
w.WriteHeader(404)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
s := `{
|
|
|
|
"subject": "acct:%[1]s@%[2]s",
|
|
|
|
"aliases": [
|
|
|
|
"https://%[2]s/@%[1]s",
|
|
|
|
"https://%[2]s/users/%[1]s"
|
|
|
|
],
|
|
|
|
"links": [
|
|
|
|
{
|
|
|
|
"rel": "http://webfinger.net/rel/profile-page",
|
|
|
|
"type": "text/html",
|
|
|
|
"href": "https://%[2]s/@%[1]s"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"rel": "self",
|
|
|
|
"type": "application/activity+json",
|
|
|
|
"href": "https://%[2]s/users/%[1]s"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}`
|
|
|
|
w.Header().Set("Content-Type", "application/json")
|
|
|
|
fmt.Fprintln(w, fmt.Sprintf(s, newuser[0], newuser[1]))
|
|
|
|
}
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
redirects = make(map[string][]string)
|
2024-06-17 21:14:47 +02:00
|
|
|
redirects["theducky@gearheads.social"] = []string{"ducky", "zio.sh"}
|
|
|
|
redirects["TinkerGear@gearheads.social"] = []string{"TinkerGear", "woof.group"}
|
|
|
|
redirects["gearedrock@gearheads.social"] = []string{"gearedrock", "rubber.social"}
|
|
|
|
redirects["Jaxon@gearheads.social"] = []string{"Jaxon", "woof.group"}
|
|
|
|
redirects["PupNirru@gearheads.social"] = []string{"PupNirru", "rubber.social"}
|
|
|
|
redirects["queerbeetfetischboy@gearheads.social"] = []string{"queerbeetgearhead", "gearheads.social"}
|
|
|
|
redirects["Vekton@gearheads.social"] = []string{"Vekton", "rubber.social"}
|
|
|
|
redirects["gearlicious@gearheads.social"] = []string{"gearlicious", "rubber.social"}
|
|
|
|
redirects["Duke_Albert@gearheads.social"] = []string{"Duke_Albert", "mastodon.social"}
|
|
|
|
redirects["rbbrbts@gearheads.social"] = []string{"queer_workwear", "rubber.social"}
|
|
|
|
redirects["second2742@gearheads.social"] = []string{"shyny_gear", "rubber.social"}
|
|
|
|
redirects["dabg0@gearheads.social"] = []string{"dabg0", "mastodon.social"}
|
|
|
|
redirects["gearguin@gearheads.social"] = []string{"Gearguin", "rubber.social"}
|
|
|
|
redirects["Halipuppeh@gearheads.social"] = []string{"Halipuppeh", "rubber.social"}
|
|
|
|
redirects["snoopypup@gearheads.social"] = []string{"snoopy", "woof.group"}
|
|
|
|
redirects["snakebite@gearheads.social"] = []string{"Snakebite", "rubber.social"}
|
|
|
|
redirects["asciran@gearheads.social"] = []string{"asciran", "woof.group"}
|
|
|
|
redirects["kometMUC@gearheads.social"] = []string{"kometMUC", "woof.group"}
|
|
|
|
redirects["pupsparkle@gearheads.social"] = []string{"pupsparkle", "rubber.social"}
|
|
|
|
redirects["pupkairo@gearheads.social"] = []string{"pupkairo", "woof.group"}
|
|
|
|
redirects["qsp@gearheads.social"] = []string{"qsp", "rubber.social"}
|
|
|
|
redirects["twincitypup@gearheads.social"] = []string{"twincitypup", "woof.group"}
|
|
|
|
redirects["shyny_gear@gearheads.social"] = []string{"shyny_gear", "rubber.social"}
|
|
|
|
redirects["mute77@gearheads.social"] = []string{"mute77", "rubber.social"}
|
|
|
|
redirects["Gearweti@gearheads.social"] = []string{"Gearweti", "rubber.social"}
|
|
|
|
redirects["NeyosBoosts@gearheads.social"] = []string{"NeyosBoosts", "rubber.social"}
|
|
|
|
redirects["cphFFsub@gearheads.social"] = []string{"cphFFsub", "woof.group"}
|
|
|
|
redirects["Lthman@gearheads.social"] = []string{"FFmanCPH", "woof.group"}
|
|
|
|
redirects["RTFM@gearheads.social"] = []string{"RTFM", "rubber.social"}
|
2024-07-31 18:33:19 +02:00
|
|
|
redirects["ducky@gearheads.social"] = []string{"ducky", "zio.sh"}
|
2024-06-17 21:14:47 +02:00
|
|
|
redirects["bondageflo@gearheads.social"] = []string{"bondageflo", "rubber.social"}
|
|
|
|
redirects["masterhusband@gearheads.social"] = []string{"masterhusband", "woof.group"}
|
2024-07-31 18:33:19 +02:00
|
|
|
redirects["astra@gearheads.social"] = []string{"astra", "zio.sh"}
|
2024-06-17 21:14:47 +02:00
|
|
|
redirects["rgemaster@gearheads.social"] = []string{"RGEMaster", "rubber.social"}
|
|
|
|
redirects["GaySlaveHusband@gearheads.social"] = []string{"GaySlaveHusband", "woof.group"}
|
|
|
|
redirects["arcticopsmx@gearheads.social"] = []string{"arcticopsmx", "woof.group"}
|
|
|
|
redirects["Red_Fox703@gearheads.social"] = []string{"red_fox703", "woof.group"}
|
|
|
|
redirects["LeatherAlphaskin@gearheads.social"] = []string{"LeatherAlphaSkin", "woof.group"}
|
|
|
|
redirects["gregingear@gearheads.social"] = []string{"gregingear", "rubber.social"}
|
|
|
|
redirects["rumble@gearheads.social"] = []string{"rumble", "rubber.social"}
|
|
|
|
redirects["uniformgearhead@gearheads.social"] = []string{"uniformgearhead", "gear.pictures"}
|
|
|
|
redirects["superpsyze@gearheads.social"] = []string{"superpsyze", "rubber.social"}
|
2024-07-31 18:33:19 +02:00
|
|
|
redirects["atlas_fm82@gearheads.social"] = []string{"atlas_fm82", "rubber.social"}
|
|
|
|
redirects["JonnyNL@gearheads.social"] = []string{"JonnyNL", "gear.pictures"}
|
|
|
|
redirects["queerbeetgearhead@gearheads.social"] = []string{"qb_gearhead", "gear.pictures"}
|
|
|
|
redirects["CreativeIcing@gearheads.social"] = []string{"CreativeIcing", "rubber.social"}
|
|
|
|
redirects["KoleBlackSoul@gearheads.social"] = []string{"koleblacksoul", "rubber.social"}
|
|
|
|
redirects["thatmilgay@gearheads.social"] = []string{"thatmilgay", "rubber.social"}
|
|
|
|
redirects["astc@gearheads.social"] = []string{"Ast", "mastodon.social"}
|
|
|
|
redirects["b0xch@gearheads.social"] = []string{"Alpenhupfi", "rubber.social"}
|
|
|
|
redirects["gregingear@gearheads.social"] = []string{"gregingear", "rubber.social"}
|
|
|
|
redirects["fighter_13579@gearheads.social"] = []string{"fighter13579", "woof.group"}
|
|
|
|
redirects["GoB@gearheads.social"] = []string{"GearOnBike", "rubber.social"}
|
|
|
|
redirects["HoodyRubsagger@gearheads.social"] = []string{"HoodyRubsagger", "rubber.social"}
|
|
|
|
redirects["foxnirrod@gearheads.social"] = []string{"foxnirrod", "rubber.social"}
|
|
|
|
redirects["gearq@gearheads.social"] = []string{"gearq", "rubber.social"}
|
|
|
|
redirects["NewdDawg@gearheads.social"] = []string{"NewdDawg", "woof.group"}
|
|
|
|
redirects["anotherfetishdude@gearheads.social"] = []string{"anotherfetishdude", "rubber.social"}
|
|
|
|
redirects["fetlads@gearheads.social"] = []string{"fetlads", "zio.sh"}
|
|
|
|
|
2024-07-07 00:51:59 +02:00
|
|
|
redirects["GaySkaterCaster@gearheads.social"] = []string{"GaySkaterFeet", "kinky.business"}
|
|
|
|
redirects["wheeeehe@gearheads.social"] = []string{"pluisje", "rubber.social"}
|
2024-07-31 18:33:19 +02:00
|
|
|
redirects["gearfrk11814@gearheads.social"] = []string{"Gearfreak_OFR", "gearheads.social"}
|
|
|
|
redirects["creativeicing@gearheads.social"] = []string{"CreativeIcing", "rubber.social"}
|
|
|
|
redirects["gearbound@gearheads.social"] = []string{"gearbound", "rubber.social"}
|
2024-07-18 23:45:09 +02:00
|
|
|
redirects["Yepp@gearheads.social"] = []string{"Yepp", "rubber.social"}
|
2024-07-26 17:08:03 +02:00
|
|
|
redirects["Divik@gearheads.social"] = []string{"Sir_Divik", "woof.group"}
|
2024-07-31 18:33:19 +02:00
|
|
|
redirects["staff@gearheads.social"] = []string{"gearheads.chat", "bsky.brid.gy"}
|
2024-06-09 01:35:51 +02:00
|
|
|
|
|
|
|
http.HandleFunc("/.well-known/webfinger", HandleWebfinger)
|
|
|
|
http.ListenAndServe(":8888", nil)
|
|
|
|
}
|