mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2024-11-24 17:14:01 +01:00
Merge branch 'feature/KASM-2837_STUN_srv_setting' into 'master'
Add -stunServer arg for on-premises STUN Closes KASM-2837 See merge request kasm-technologies/internal/KasmVNC!57
This commit is contained in:
commit
5e2a8b45da
@ -170,10 +170,15 @@ void getPublicIP() {
|
||||
abort();
|
||||
|
||||
unsigned i;
|
||||
for (i = 0; i < sizeof(servers) / sizeof(servers[0]); i++) {
|
||||
if (tryserver(servers[i], sock))
|
||||
break;
|
||||
vlog.info("STUN server %u didn't work, trying next...", i);
|
||||
if (rfb::Server::stunServer[0]) {
|
||||
if (strlen(rfb::Server::stunServer) < PATH_MAX)
|
||||
tryserver(rfb::Server::stunServer, sock);
|
||||
} else {
|
||||
for (i = 0; i < sizeof(servers) / sizeof(servers[0]); i++) {
|
||||
if (tryserver(servers[i], sock))
|
||||
break;
|
||||
vlog.info("STUN server %u didn't work, trying next...", i);
|
||||
}
|
||||
}
|
||||
|
||||
close(sock);
|
||||
|
@ -221,6 +221,10 @@ rfb::StringParameter rfb::Server::publicIP
|
||||
("publicIP",
|
||||
"The server's public IP, for UDP negotiation. If not set, will be queried via the internet.",
|
||||
"");
|
||||
rfb::StringParameter rfb::Server::stunServer
|
||||
("stunServer",
|
||||
"Use this STUN server for querying the server's public IP. If not set, a hardcoded list is used.",
|
||||
"");
|
||||
|
||||
rfb::IntParameter rfb::Server::udpFullFrameFrequency
|
||||
("udpFullFrameFrequency",
|
||||
|
@ -64,6 +64,7 @@ namespace rfb {
|
||||
static IntParameter udpPort;
|
||||
static StringParameter kasmPasswordFile;
|
||||
static StringParameter publicIP;
|
||||
static StringParameter stunServer;
|
||||
static BoolParameter printVideoArea;
|
||||
static BoolParameter protocol3_3;
|
||||
static BoolParameter alwaysShared;
|
||||
|
@ -127,6 +127,12 @@ The server's public IP, for UDP negotiation. If not set, will be queried via the
|
||||
Default unset.
|
||||
.
|
||||
.TP
|
||||
.B \-StunServer \fIsrv\fP
|
||||
Use this STUN server for querying the server's public IP. If not set, a hardcoded list of
|
||||
STUN servers is used.
|
||||
Default unset.
|
||||
.
|
||||
.TP
|
||||
.B \-udpFullFrameFrequency \fIframes\fP
|
||||
Send a full frame every N frames for clients using UDP. 0 to disable. Default \fI0\fP.
|
||||
.
|
||||
|
Loading…
Reference in New Issue
Block a user