Commit graph

124 commits

Author SHA1 Message Date
3563b4e819
feat: change how headers are passed to the client and move constant variables 2025-03-06 22:25:21 -03:00
f7e75ce5e7
feat: use invidious-companion way to handle Range header and query parameter 2025-03-06 21:31:37 -03:00
1045548164
style: remove dead code comments and move comments
All checks were successful
CI / build (push) Successful in 51s
2025-03-04 15:21:55 -03:00
c50e482085
remove domain only access, that can be done in the reverse proxy side 2025-03-04 15:16:32 -03:00
94edee02d1
remove bandwidth limiter, that is being done in the reverse proxy side 2025-03-04 15:14:10 -03:00
f9b7cf20ed
add option to enable http server or not 2025-03-04 15:10:26 -03:00
6f4567df0c
include prefix for all environment variables
All checks were successful
CI / build (push) Successful in 1m4s
2025-03-04 15:06:13 -03:00
f66aa3efa6
ci: update go build path on Dockerfile and update CI file
All checks were successful
CI / build (push) Successful in 1m38s
2025-02-20 02:12:42 -03:00
340ee021bb
chore: get rid of the stats and only use prometheus metrics
Some checks failed
CI / build (push) Failing after 31s
2025-02-20 01:27:30 -03:00
8821540bd9
style: refactor project to use the standard go project layout 2025-02-20 01:13:40 -03:00
cc4671c677
feat(httppaths): remove connection checker
All checks were successful
CI / build (push) Successful in 59s
I doubt this is even used
2025-02-19 20:01:35 -03:00
319991c7b8
fix(videoplayback): Use HEAD requests to get the location of the videoplayback URL before doing a POST
All checks were successful
CI / build (push) Successful in 1m1s
"RFC 1945 and RFC 2068 specify that the client is not allowed to change
the method on the redirected request. However, most existing user agent
implementations treat 302 as if it were a 303 response, performing a GET
on the Location field-value regardless of the original request method.
The status codes 303 and 307 have been added for servers that wish to
make unambiguously clear which kind of reaction is expected of the
client."

Before doing this, POST requests that got a 302 status code, get
converted automatically to GET requests by the standard, which should
not happen. That is why Invidious does 5 HEAD requests to get the
Location header and send a correct URL on the POST request (NOTE:
INVIDIOUS UPSTREAMS STILL USES GET REQUESTS TO GET THE VIDEO FROM
YOUTUBE, THAT IS SUBJECT TO CHANGE with https://github.com/iv-org/invidious/issues/5034:

164d764d55/src/invidious/routes/video_playback.cr (L48-L78)

Due to this the redirects, the Host header can also change, so if the
stream is open for a long time and it gets redirected to another URL,
the Host header used the old Host header instead of the new one returned
by the Location header on the HEAD request to googlevideo.com, making
the request fail.

I hope this shit works tho
2025-02-19 18:41:49 -03:00
197a807b90
feat: func to rotate the IP address from gluetun automatically depending of the traffic
this is supposed to execute every second to be able to calulate the difference of the transmitted bytes

fuck

fuck fuck: change block checker cooldown back to 60 seconds
2025-02-19 17:21:59 -03:00
53d04ac79b
feat: WIP stat to calculate the rate of 403 videoplayback requests
All checks were successful
CI / build (push) Successful in 51s
2025-02-11 23:45:21 -03:00
f66ae3187f
feat(http client): Add environment variable to use a proxy (http, socks5, socks5h, etc...) 2025-01-06 22:11:29 -03:00
3fc14dd18b
the 'c' query params is not is not strictly necessary. It can break hls streams 2025-01-01 01:03:17 -03:00
a98a4ba1bf
check if the connection has been closed before doing the request to google servers 2024-12-22 01:09:19 -03:00
71abe2ae58
Add option to disable the host restriction 2024-12-21 14:54:46 -03:00
b156a52420
test 2024-12-21 14:53:33 -03:00
e28d86018e
and also disable range query becuase I'm not willing to fix it right now 2024-12-21 01:37:52 -03:00
86170fd39e
disable arm builds for now 2024-12-21 00:59:12 -03:00
2a6e80380d
fix bool environment variables 2024-12-21 00:58:55 -03:00
985ef449c5
alr query param makes youtube return an URL and not video data 2024-12-21 00:34:04 -03:00
279570d47b
show version of the proxy on x-powered-by headers 2024-12-20 23:52:43 -03:00
571a2351e9
strip report-to header from responses 2024-12-20 17:28:19 -03:00
161c61bcce
use videoplayback conventions from invidious-companion 2024-12-20 17:13:23 -03:00
200a536207
better env variables handling 2024-12-20 17:12:59 -03:00
0a4dd54393
update dockerfile and docker compose file 2024-12-20 17:12:17 -03:00
03a37009c4
handle user-agent header based on  query param 2024-12-16 02:34:09 -03:00
46d11bfa53
Update docker compose file 2024-12-13 17:25:01 -03:00
e698c1df4d
use log. instead of fmt. for logging 2024-12-13 17:24:52 -03:00
ff9f99c1b6
better 403 request handling 2024-12-13 17:24:03 -03:00
802dd65edf
Add HSTS header 2024-12-11 13:53:06 -03:00
d225323628
Revert 848ad555f7 and 939f4da3f7
If the user on Invidious uses HD720, the playback is broken becuase the
"Origin" header is not sent (unknown reason).

This also appears to break third party clients like Clipious.

I'm retarted sorry n.n
2024-11-13 21:55:01 -03:00
848ad555f7
fixup! security: restrict the setting of CORS headers to inv.nadeko.net related domains 2024-11-12 09:58:02 -03:00
939f4da3f7
security: restrict the setting of CORS headers to inv.nadeko.net related domains
security: restrict the setting of CORS headers to inv.nadeko.net related domains
2024-11-12 09:24:29 -03:00
89c880bb27
Fix CORS when OPTIONS method is requested 2024-11-08 13:34:54 -03:00
40436dcf92
Disallow access from IP addresses 2024-11-06 15:54:40 -03:00
7d40f898a6
fixup! Support for prometheus /metrics endpoint 2024-11-06 00:53:01 -03:00
21036c3e30
Support for prometheus /metrics endpoint 2024-11-06 00:36:54 -03:00
0d4bd67afb
Update CI 2024-11-05 17:58:10 -03:00
b150f128b1
Update docker-compose.yml and provide .env 2024-11-05 17:58:10 -03:00
56345e5bae
Prevent processing of already expired videoplayback links 2024-11-05 13:50:53 -03:00
3b89ea41e7
Add uptime to /stats 2024-11-04 12:05:59 -03:00
654610ecd3
Track established connections on /stats 2024-11-04 11:56:46 -03:00
bdb1afbf61
HTTP/3 Server side support 2024-11-04 10:48:00 -03:00
78ae56be37
Fix HD720 and audio only playbacks (Hopefully this will fix it right?) 2024-10-31 19:29:05 -03:00
fa0c7e9373
Display an error if panic 2024-10-31 18:29:39 -03:00
900b6bd3e7
Add headers to look like a browser 2024-10-31 18:29:38 -03:00
a37a1a5ff1
Add rate limit per connection 2024-10-29 21:27:09 -03:00