策略配置MicrosoftEdge、GoogleChrome是否启⽤QUIC实验
流式传输控制协议
使⽤⽅法:
SupportExperimentalQuicProtocol=fal;//禁⽤两款浏览器使⽤QUIC协议传输流媒体
SupportExperimentalQuicProtocol=true;//允许两款浏览器使⽤QUIC协议传输流媒体
privateconststringEXPERIMENTALQUICPROTOCOL_POLICIES_CHROME=@"SoftwarePoliciesGoogleChrome";
privateconststringEXPERIMENTALQUICPROTOCOL_POLICIES_EDGE=@"SoftwarePoliciesMicrosoftEdge";
publicstaticboolSupportExperimentalQuicProtocol
{
get
{
return
IsSupportExperimentalQuicProtocol(EXPERIMENTALQUICPROTOCOL_POLICIES_EDGE)||
IsSupportExperimentalQuicProtocol(EXPERIMENTALQUICPROTOCOL_POLICIES_CHROME);
}
t
{
SetSupportExperimentalQuicProtocol(EXPERIMENTALQUICPROTOCOL_POLICIES_EDGE,value);
SetSupportExperimentalQuicProtocol(EXPERIMENTALQUICPROTOCOL_POLICIES_CHROME,value);
}
}
privatestaticvoidSetSupportExperimentalQuicProtocol(stringkey,boolvalue)
{
RegistryKeyrk=null;
try
{
rk=SubKey(key,
iteSubTree,le);
}
catch(Exception)
{
try
{
rk=bKey(key);
}
catch(Exception){}
}
using(rk)
{
if(rk!=null)
{
try
{
ue("QuicAllowed",value?1:0);
}
catch(Exception){}
}
}
}
privatestaticboolIsSupportExperimentalQuicProtocol(stringkey)
{
RegistryKeyrk=null;
try
{
using(rk=bKey(key,fal))
{
intr=0;
try
{
objectv=ue("QuicAllowed");
r=32(v);
}
catch(Exception)
{
returntrue;
}
returnr!=0;
}
}
catch(Exception)
{
returntrue;
}
}
本文发布于:2023-01-04 05:27:01,感谢您对本站的认可!
本文链接:http://www.wtabcd.cn/fanwen/fan/90/88867.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |