mirror of https://github.com/2dust/v2rayN
Custom configuration file to use Xray prefix in non-Tun mode
https://github.com/2dust/v2rayN/issues/4855pull/4917/head
parent
ee3159b00e
commit
1aef49ee11
|
@ -208,18 +208,19 @@ namespace v2rayN.Handler
|
|||
{
|
||||
if ((node.configType == EConfigType.Custom && node.preSocksPort > 0))
|
||||
{
|
||||
var preCoreType = _config.tunModeItem.enableTun ? ECoreType.sing_box : ECoreType.Xray;
|
||||
var itemSocks = new ProfileItem()
|
||||
{
|
||||
coreType = ECoreType.sing_box,
|
||||
coreType = preCoreType,
|
||||
configType = EConfigType.Socks,
|
||||
address = Global.Loopback,
|
||||
port = node.preSocksPort
|
||||
};
|
||||
_config.runningCoreType = ECoreType.sing_box;
|
||||
_config.runningCoreType = preCoreType;
|
||||
string fileName2 = Utils.GetConfigPath(Global.CorePreConfigFileName);
|
||||
if (CoreConfigHandler.GenerateClientConfig(itemSocks, fileName2, out string msg2, out string configStr) == 0)
|
||||
{
|
||||
var coreInfo2 = LazyConfig.Instance.GetCoreInfo(ECoreType.sing_box);
|
||||
var coreInfo2 = LazyConfig.Instance.GetCoreInfo(preCoreType);
|
||||
var proc2 = RunProcess(node, coreInfo2, $" -c {Global.CorePreConfigFileName}", true);
|
||||
if (proc2 is not null)
|
||||
{
|
||||
|
|
|
@ -3149,7 +3149,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 * After setting this value, an socks service will be started using sing-box to provide functions such as speed display 的本地化字符串。
|
||||
/// 查找类似 * After setting this value, an socks service will be started using Xray/sing-box(Tun) to provide functions such as speed display 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string TipPreSocksPort {
|
||||
get {
|
||||
|
|
|
@ -698,7 +698,7 @@
|
|||
<value>txtPreSocksPort</value>
|
||||
</data>
|
||||
<data name="TipPreSocksPort" xml:space="preserve">
|
||||
<value>* After setting this value, an socks service will be started using sing-box to provide functions such as speed display</value>
|
||||
<value>* After setting this value, an socks service will be started using Xray/sing-box(Tun) to provide functions such as speed display</value>
|
||||
</data>
|
||||
<data name="TbBrowse" xml:space="preserve">
|
||||
<value>Browse</value>
|
||||
|
|
|
@ -701,7 +701,7 @@
|
|||
<value>txtPreSocksPort</value>
|
||||
</data>
|
||||
<data name="TipPreSocksPort" xml:space="preserve">
|
||||
<value>* After setting this value, an socks service will be started using sing-box to provide functions such as speed display</value>
|
||||
<value>* After setting this value, an socks service will be started using Xray/sing-box(Tun) to provide functions such as speed display</value>
|
||||
</data>
|
||||
<data name="TbBrowse" xml:space="preserve">
|
||||
<value>Browse</value>
|
||||
|
|
|
@ -701,7 +701,7 @@
|
|||
<value>txtPreSocksPort</value>
|
||||
</data>
|
||||
<data name="TipPreSocksPort" xml:space="preserve">
|
||||
<value>* После установки этого значения служба socks будет запущена с использованием sing-box для обеспечения таких функций, как отображение скорости</value>
|
||||
<value>* После установки этого значения служба socks будет запущена с использованием Xray/sing-box(Tun) для обеспечения таких функций, как отображение скорости</value>
|
||||
</data>
|
||||
<data name="TbBrowse" xml:space="preserve">
|
||||
<value>Просмотр</value>
|
||||
|
|
|
@ -701,7 +701,7 @@
|
|||
<value>Socks端口</value>
|
||||
</data>
|
||||
<data name="TipPreSocksPort" xml:space="preserve">
|
||||
<value>* 自定义配置的Socks端口值,可不设置;当设置此值后,将使用sing-box额外启动一个前置Socks服务,提供分流和速度显示等功能</value>
|
||||
<value>* 自定义配置的Socks端口值,可不设置;当设置此值后,将使用Xray/sing-box(Tun)额外启动一个前置Socks服务,提供分流和速度显示等功能</value>
|
||||
</data>
|
||||
<data name="TbBrowse" xml:space="preserve">
|
||||
<value>浏览</value>
|
||||
|
|
|
@ -700,7 +700,7 @@
|
|||
<value>SOCKS埠</value>
|
||||
</data>
|
||||
<data name="TipPreSocksPort" xml:space="preserve">
|
||||
<value>* 自訂配置的Socks埠值,可不設定;當設定此值後,將使用sing-box額外啟動一個前置Socks服務,提供分流和速度顯示等功能</value>
|
||||
<value>* 自訂配置的Socks埠值,可不設定;當設定此值後,將使用Xray/sing-box(Tun)額外啟動一個前置Socks服務,提供分流和速度顯示等功能</value>
|
||||
</data>
|
||||
<!--********************************************-->
|
||||
<data name="TbBrowse" xml:space="preserve">
|
||||
|
|
Loading…
Reference in New Issue