mirror of
https://github.com/Novetus/Novetus_src.git
synced 2025-01-31 09:41:33 +02:00
fix proxy not working for roblox browser. complete proxy command.
This commit is contained in:
parent
be8fa8a3d9
commit
cfad6b29af
@ -69,12 +69,12 @@ public class WebProxy
|
||||
{
|
||||
string uri = client.Request.RequestUri.Host;
|
||||
|
||||
if ((!uri.StartsWith("www.") &&
|
||||
!uri.StartsWith("web.") &&
|
||||
!uri.StartsWith("assetgame.") &&
|
||||
!uri.StartsWith("wiki.") &&
|
||||
!uri.EndsWith("api.roblox.com") &&
|
||||
!uri.StartsWith("roblox.com") || !uri.EndsWith("roblox.com")) &&
|
||||
if ((!uri.StartsWith("www.") &&
|
||||
!uri.StartsWith("web.") &&
|
||||
!uri.StartsWith("assetgame.") &&
|
||||
!uri.StartsWith("wiki.") &&
|
||||
!uri.EndsWith("api.roblox.com") &&
|
||||
!uri.StartsWith("roblox.com") || !uri.EndsWith("roblox.com")) &&
|
||||
!uri.EndsWith("robloxlabs.com"))
|
||||
{
|
||||
return false;
|
||||
@ -92,9 +92,9 @@ public class WebProxy
|
||||
|
||||
string ua = userAgents.FirstOrDefault().Value.ToLowerInvariant();
|
||||
|
||||
Util.ConsolePrint(ua);
|
||||
|
||||
return ua.Contains("roblox");
|
||||
//for some reason, this doesn't go through for the browser unless we look for mozilla/4.0.
|
||||
//this shouldn't break modern mozilla browsers though.
|
||||
return (ua.Contains("mozilla/4.0") || ua.Contains("roblox"));
|
||||
}
|
||||
|
||||
private Task OnBeforeTunnelConnectRequest(object sender, TunnelConnectSessionEventArgs e)
|
||||
@ -116,7 +116,6 @@ public class WebProxy
|
||||
return;
|
||||
}
|
||||
|
||||
Util.ConsolePrint("we should be returning a 404 here.");
|
||||
e.GenericResponse("", HttpStatusCode.NotFound);
|
||||
}
|
||||
|
||||
|
@ -357,10 +357,28 @@ namespace NovetusLauncher
|
||||
de.Show();
|
||||
Util.ConsolePrint("???", 2);
|
||||
break;
|
||||
case string proxy when proxy.Contains("proxytest", StringComparison.InvariantCultureIgnoreCase) == true:
|
||||
GlobalVars.Proxy.Start();
|
||||
//Util.Delay(5000);
|
||||
//GlobalVars.Proxy.Stop();
|
||||
case string proxy when proxy.Contains("proxy", StringComparison.InvariantCultureIgnoreCase) == true:
|
||||
try
|
||||
{
|
||||
string[] vals = proxy.Split(' ');
|
||||
|
||||
if (vals[1].Equals("on", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
GlobalVars.Proxy.Start();
|
||||
}
|
||||
else if (vals[1].Equals("off", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
GlobalVars.Proxy.Stop();
|
||||
}
|
||||
else
|
||||
{
|
||||
Util.ConsolePrint("Please specify 'on' or 'off'.", 2);
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Util.ConsolePrint("Please specify 'on' or 'off'.", 2);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
Util.ConsolePrint("Command is either not registered or valid", 2);
|
||||
|
Loading…
Reference in New Issue
Block a user