11 Commits

Author SHA1 Message Date
fiatjaf
f8afb51ee9 ratelimits. 2024-05-12 20:37:00 -03:00
fiatjaf
b00e5b2b3f
only reset ws.Authed if it's nil.
i.e. if there has been an auth and for some reason the client tried to auth again
after RequestAuth() has been called again.
2023-12-27 13:05:31 -03:00
fiatjaf
21b08cb044
fix closing of closed ws.Authed channel when client AUTHs twice. 2023-12-27 12:30:23 -03:00
fiatjaf
5b17786273
bring back RequestAuth(ctx), now as a global. 2023-12-25 09:30:13 -03:00
fiatjaf
77600dc05c
expose GetSubscriptionID(ctx) 2023-12-25 09:14:09 -03:00
fiatjaf
7e06629953
superficial tweaks to auth handling. 2023-12-09 14:41:54 -03:00
fiatjaf
d3a0c545d2
GetIP() and GetOpenSubscriptions() utils. 2023-12-09 08:19:37 -03:00
fiatjaf
22da06b629
new flow for auth based on "auth-required: " rejection messages. 2023-12-06 12:14:58 -03:00
fiatjaf
a15cd4e545
fix replaceable handlers to not delete things all the time. 2023-11-07 14:14:53 -03:00
fiatjaf
bbe186494e
replace mutex-guarded maps with xsync/v2 maps. 2023-10-03 08:32:07 -03:00
fiatjaf
8968982b9a
relayer, second attempt, now much better. 2023-08-10 14:32:11 -03:00