mirror of
https://github.com/proxysu/ProxySU.git
synced 2024-11-22 05:06:08 +03:00
update grpc settings
This commit is contained in:
parent
9923437691
commit
b82e857edd
@ -47,6 +47,7 @@ namespace ProxySuper.Core.Models.Projects
|
||||
VLESS_KCP_Port,
|
||||
VMESS_KCP_Port,
|
||||
ShadowSocksPort,
|
||||
VLESS_gRPC_Port,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -94,18 +94,6 @@ namespace ProxySuper.Core.Services
|
||||
caddyStr = caddyStr.Replace("##reverse_proxy##", "");
|
||||
}
|
||||
|
||||
if (parameters.Types.Contains(XrayType.VLESS_gRPC))
|
||||
{
|
||||
var grpcCaddyfile = File.ReadAllText(Path.Combine(CaddyFileDir, "grpc.caddyfile"));
|
||||
grpcCaddyfile = grpcCaddyfile.Replace("##domain##", parameters.Domain);
|
||||
grpcCaddyfile = grpcCaddyfile.Replace("##port##", parameters.VLESS_gRPC_Port.ToString());
|
||||
grpcCaddyfile = grpcCaddyfile.Replace("##local_port##", VLESS_gRPC_Port.ToString());
|
||||
grpcCaddyfile = grpcCaddyfile.Replace("##path##", parameters.VLESS_gRPC_ServiceName);
|
||||
|
||||
caddyStr += "\n";
|
||||
caddyStr += grpcCaddyfile;
|
||||
}
|
||||
|
||||
return caddyStr;
|
||||
}
|
||||
|
||||
@ -142,6 +130,7 @@ namespace ProxySuper.Core.Services
|
||||
gRPCInBound.port = VLESS_gRPC_Port;
|
||||
gRPCInBound.settings.clients[0].id = parameters.UUID;
|
||||
gRPCInBound.streamSettings.grpcSettings.serviceName = parameters.VLESS_gRPC_ServiceName;
|
||||
gRPCInBound.streamSettings.tlsSettings.serverName = parameters.Domain;
|
||||
xrayConfig.inbounds.Add(JToken.FromObject(gRPCInBound));
|
||||
}
|
||||
|
||||
|
@ -303,9 +303,6 @@
|
||||
<None Include="Templates\xray\caddy\base.caddyfile">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Templates\xray\caddy\grpc.caddyfile">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Templates\xray\client\00_log\00_log.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
|
@ -1,10 +0,0 @@
|
||||
##domain##:##port## {
|
||||
@grpc {
|
||||
protocol grpc
|
||||
path ##path##
|
||||
}
|
||||
|
||||
reverse_proxy @grpc h2c://127.0.0.1:##local_port##
|
||||
root * /var/www
|
||||
file_server
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"port": 2003,
|
||||
"listen": "127.0.0.1",
|
||||
"port": 2002,
|
||||
"listen": "0.0.0.0",
|
||||
"protocol": "vless",
|
||||
"settings": {
|
||||
"clients": [
|
||||
@ -11,9 +11,22 @@
|
||||
"decryption": "none"
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "grpc",
|
||||
"network": "gun",
|
||||
"security": "tls",
|
||||
"tlsSettings": {
|
||||
"serverName": "domain",
|
||||
"alpn": [
|
||||
"h2"
|
||||
],
|
||||
"certificates": [
|
||||
{
|
||||
"certificateFile": "/usr/local/etc/xray/ssl/xray_ssl.crt",
|
||||
"keyFile": "/usr/local/etc/xray/ssl/xray_ssl.key"
|
||||
}
|
||||
]
|
||||
},
|
||||
"grpcSettings": {
|
||||
"serviceName": ""
|
||||
"serviceName": "service_name"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -51,12 +51,12 @@
|
||||
<ctrl:VLESS_KCP_Control />
|
||||
</TabItem>
|
||||
|
||||
<!--<TabItem Width="200"
|
||||
<TabItem Width="200"
|
||||
Tag="{x:Static models:XrayType.VLESS_gRPC}"
|
||||
IsEnabled="{Binding Checked_VLESS_gRPC}"
|
||||
Header="VLESS-gRPC">
|
||||
<ctrl:VLESS_gRPC_Control />
|
||||
</TabItem>-->
|
||||
</TabItem>
|
||||
|
||||
<!--<TabItem Width="200" Height="40"
|
||||
Tag="{x:Static models:XrayType.VMESS_TCP}"
|
||||
|
Loading…
Reference in New Issue
Block a user