Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When using H2 Auto_server mode, is it possible to bind the socket to localhost?

Tags:

h2

The documentation, implies that the connection is always remotely available, but since I use this on a laptop, and change networks, sometimes the clients don't know how to connect, since they are trying to use an IP that is no longer valid.

So, the question is: Is there any way to force H2 to only listen on localhost for auto_server=true?

like image 960
Paul Wagland Avatar asked Feb 22 '23 16:02

Paul Wagland


1 Answers

Yes, you can set the server bind address using the system property "h2.bindAddress".

like image 82
Thomas Mueller Avatar answered Apr 30 '23 09:04

Thomas Mueller