iv-org / inv_sig_helper

GNU Affero General Public License v3.0
19 stars 4 forks source link

[Feature request] TCP/IP support #2

Closed unixfox closed 1 month ago

unixfox commented 1 month ago

Hello,

Could it be possible to add support for TCP/IP, as such that multiple Invidious processes can use one common inv_sig_helper?

Will also ease the setup in containers because TCP/IP communication is much simpler than UNIX sockets as explained here: https://github.com/iv-org/invidious/pull/4789#issuecomment-2241101792

But inv_sig_helper still created just unix domain socket and invidious is automatically using it. So running it in the same container was the easiest and fastest way to get it working for testing since sharing UDS between containers can be tricky and I wasn't going for permanent solution.

Thank you.

techmetx11 commented 1 month ago

On Sun, Jul 21, 2024 at 07:11:07AM GMT, Émilien (perso) wrote:

Assigned #2 to @techmetx11.

-- Reply to this email directly or view it on GitHub: https://github.com/iv-org/inv_sig_helper/issues/2#event-13592530371 You are receiving this because you were assigned.

Message ID: @.***>

I am working on TCP/IP support at the moment. Thank you

unixfox commented 1 month ago

Very sorry! I didn't mean to create a useless notification. I was assigning you because you assigned yourself on the other issue, so I thought you would want to be assigned here too.

techmetx11 commented 1 month ago

It's okay. I should have responded earlier anyway

unixfox commented 1 month ago

Thank you @techmetx11 for the implementation!

I saw that you did set it to 0.0.0.0, but wouldn't it make more sense to set it to listen on 127.0.0.1 by default?

I know in Invidious we would maybe make it listen on 127.0.0.1 by default too: https://github.com/iv-org/invidious/issues/4739

About the implementation, can a user set a custom address and port? In case the port 12999 is already taken or for the host if the user wants to make it listen on another address?

techmetx11 commented 1 month ago

On Sun, Jul 21, 2024 at 08:57:31AM GMT, Émilien (perso) wrote:

Thank you @techmetx11 for the implementation!

I saw that you did set it to 0.0.0.0, but wouldn't it make more sense to set it to listen on 127.0.0.1 by default?

0.0.0.0 will make it listen on all interfaces, in systems i've tested this on

I know in Invidious we would maybe make it listen on 127.0.0.1 by default too: https://github.com/iv-org/invidious/issues/4739

About the implementation, can a user set a custom address and port? In case the port, 12999 is already taken or for the host if the user wants to make it listen on another address?

Yes, you can do ./inv_sig_helper --tcp 127.0.0.1:8080

-- Reply to this email directly or view it on GitHub: https://github.com/iv-org/inv_sig_helper/issues/2#issuecomment-2241696199 You are receiving this because you were mentioned.

Message ID: @.***>

unixfox commented 1 month ago

On Sun, Jul 21, 2024 at 08:57:31AM GMT, Émilien (perso) wrote: Thank you @techmetx11 for the implementation! I saw that you did set it to 0.0.0.0, but wouldn't it make more sense to set it to listen on 127.0.0.1 by default? 0.0.0.0 will make it listen on all interfaces, in systems i've tested this on

Yes I was telling about the fact if it's a good practice to make this listening on all interfaces by default or not. Because if one runs the program outside of docker then the process may accept requests from the entire internet if the VM is directly exposed on the internet.

techmetx11 commented 1 month ago

Hm. Maybe it's not a good idea to listen on 0.0.0.0

On Sun, Jul 21, 2024 at 09:04:30AM GMT, Émilien (perso) wrote:

On Sun, Jul 21, 2024 at 08:57:31AM GMT, Émilien (perso) wrote: Thank you @techmetx11 for the implementation! I saw that you did set it to 0.0.0.0, but wouldn't it make more sense to set it to listen on 127.0.0.1 by default? 0.0.0.0 will make it listen on all interfaces, in systems i've tested this on

Yes I was telling about the fact if it's a good practice to make this listening on all interfaces by default or not. Because if one runs the program outside of docker then the process may accept requests from the entire internet if the VM is directly exposed on the internet.

-- Reply to this email directly or view it on GitHub: https://github.com/iv-org/inv_sig_helper/issues/2#issuecomment-2241698085 You are receiving this because you were mentioned.

Message ID: @.***>