mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
Add appconfig option for enabling WebRTC.
This commit is contained in:
parent
e4388fde87
commit
3731848420
@ -96,7 +96,7 @@
|
||||
<input id="qualityRangeInput" value="50" max="100" class="form-control-range" type="range" />
|
||||
<div style="color:white; font-size:12px; text-align: left">
|
||||
<input id="autoAdjustQualityCheckBox" type="checkbox" checked />
|
||||
<label>Auto Adjust</label>
|
||||
<label for="autoAdjustQualityCheckBox">Auto Adjust</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -108,7 +108,7 @@
|
||||
<textarea id="clipboardTransferTextArea"></textarea>
|
||||
<div style="color:white; font-size:12px; text-align: left">
|
||||
<input id="clipboardTransferTypeCheckbox" type="checkbox" />
|
||||
<label>Type Input</label>
|
||||
<label for="clipboardTransferTypeCheckbox">Type Input</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ namespace Remotely.Server.Services
|
||||
public string[] KnownProxies => Config.GetSection("ApplicationOptions:KnownProxies").Get<string[]>();
|
||||
public int MaxOrganizationCount => int.Parse(Config["ApplicationOptions:MaxOrganizationCount"]);
|
||||
public bool RecordRemoteControlSessions => bool.Parse(Config["ApplicationOptions:RecordRemoteControlSessions"]);
|
||||
public bool RedirectToHTTPS => bool.Parse(Config["ApplicationOptions:RedirectToHTTPS"]);
|
||||
public bool RedirectToHttps => bool.Parse(Config["ApplicationOptions:RedirectToHttps"]);
|
||||
public bool RemoteControlRequiresAuthentication => bool.Parse(Config["ApplicationOptions:RemoteControlRequiresAuthentication"]);
|
||||
public double RemoteControlSessionLimit => double.Parse(Config["ApplicationOptions:RemoteControlSessionLimit"]);
|
||||
public string SmtpDisplayName => Config["ApplicationOptions:SmtpDisplayName"];
|
||||
@ -34,7 +34,8 @@ namespace Remotely.Server.Services
|
||||
public string SmtpUserName => Config["ApplicationOptions:SmtpUserName"];
|
||||
public string Theme => Config["ApplicationOptions:Theme"];
|
||||
public string[] TrustedCorsOrigins => Config.GetSection("ApplicationOptions:TrustedCorsOrigins").Get<string[]>();
|
||||
public bool UseHSTS => bool.Parse(Config["ApplicationOptions:RedirectToHTTPS"]);
|
||||
public bool UseHsts => bool.Parse(Config["ApplicationOptions:UseHsts"]);
|
||||
public bool UseWebRtc => bool.Parse(Config["ApplicationOptions:UseWebRtc"]);
|
||||
private IConfiguration Config { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -182,7 +182,10 @@ namespace Remotely.Server.Services
|
||||
|
||||
public async Task SendRtcOfferToBrowser(string sdp, string viewerID)
|
||||
{
|
||||
await RCBrowserHub.Clients.Client(viewerID).SendAsync("ReceiveRtcOffer", sdp);
|
||||
if (AppConfig.UseWebRtc)
|
||||
{
|
||||
await RCBrowserHub.Clients.Client(viewerID).SendAsync("ReceiveRtcOffer", sdp);
|
||||
}
|
||||
}
|
||||
public async Task SendIceCandidateToBrowser(string candidate, int sdpMlineIndex, string sdpMid, string viewerID)
|
||||
{
|
||||
|
||||
@ -169,11 +169,11 @@ namespace Remotely.Server
|
||||
else
|
||||
{
|
||||
app.UseExceptionHandler("/Error");
|
||||
if (bool.Parse(Configuration["ApplicationOptions:UseHSTS"]))
|
||||
if (bool.Parse(Configuration["ApplicationOptions:UseHsts"]))
|
||||
{
|
||||
app.UseHsts();
|
||||
}
|
||||
if (bool.Parse(Configuration["ApplicationOptions:RedirectToHTTPS"]))
|
||||
if (bool.Parse(Configuration["ApplicationOptions:RedirectToHttps"]))
|
||||
{
|
||||
app.UseHttpsRedirection();
|
||||
}
|
||||
|
||||
@ -18,10 +18,9 @@
|
||||
"EnableWindowsEventLog": false,
|
||||
"KnownProxies": [],
|
||||
"RecordRemoteControlSessions": false,
|
||||
"RedirectToHTTPS": false,
|
||||
"RedirectToHttps": false,
|
||||
"RemoteControlSessionLimit": 1,
|
||||
"RemoteControlRequiresAuthentication": true,
|
||||
"UseHSTS": false,
|
||||
"SmtpHost": "",
|
||||
"SmtpPort": 25,
|
||||
"SmtpUserName": "",
|
||||
@ -30,6 +29,8 @@
|
||||
"SmtpDisplayName": "",
|
||||
"SmtpEnableSsl": true,
|
||||
"TrustedCorsOrigins": [],
|
||||
"Theme": "Dark"
|
||||
"Theme": "Dark",
|
||||
"UseHsts": false,
|
||||
"UseWebRtc": true
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user