mirror of https://github.com/2dust/v2rayN
add exception log
parent
d83ae315ed
commit
f5ecda9255
|
@ -51,8 +51,9 @@ namespace v2rayN.Base
|
||||||
|
|
||||||
return await response.Content.ReadAsStringAsync();
|
return await response.Content.ReadAsStringAsync();
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Utils.SaveLog("GetAsync", ex);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -481,8 +481,9 @@ namespace v2rayN.Handler
|
||||||
File.Delete(fileName);
|
File.Delete(fileName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Utils.SaveLog(ex.Message, ex);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using System.Drawing;
|
using System;
|
||||||
|
using System.Drawing;
|
||||||
using ZXing;
|
using ZXing;
|
||||||
using ZXing.QrCode;
|
using ZXing.QrCode;
|
||||||
|
|
||||||
|
@ -34,8 +35,9 @@ namespace v2rayN.Handler
|
||||||
img = (Image)bmp;
|
img = (Image)bmp;
|
||||||
return img;
|
return img;
|
||||||
}
|
}
|
||||||
catch
|
catch(Exception ex)
|
||||||
{
|
{
|
||||||
|
Utils.SaveLog(ex.Message, ex);
|
||||||
return img;
|
return img;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,8 +51,9 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Utils.SaveLog(ex.Message, ex);
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -360,8 +361,9 @@ namespace v2rayN.Handler
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Utils.SaveLog(ex.Message, ex);
|
||||||
msg = ResUI.Incorrectconfiguration;
|
msg = ResUI.Incorrectconfiguration;
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,8 +83,9 @@ namespace v2rayN.Handler
|
||||||
|
|
||||||
msg = string.Format(ResUI.SuccessfulConfiguration, $"[{config.GetGroupRemarks(node.groupId)}] {node.GetSummary()}");
|
msg = string.Format(ResUI.SuccessfulConfiguration, $"[{config.GetGroupRemarks(node.groupId)}] {node.GetSummary()}");
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Utils.SaveLog("GenerateClientConfig", ex);
|
||||||
msg = ResUI.FailedGenDefaultConfiguration;
|
msg = ResUI.FailedGenDefaultConfiguration;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -130,8 +131,9 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Utils.SaveLog(ex.Message, ex);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -176,8 +178,9 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Utils.SaveLog(ex.Message, ex);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -246,8 +249,9 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Utils.SaveLog(ex.Message, ex);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -345,8 +349,9 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Utils.SaveLog(ex.Message, ex);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -581,8 +586,9 @@ namespace v2rayN.Handler
|
||||||
outbound.settings.vnext = null;
|
outbound.settings.vnext = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Utils.SaveLog(ex.Message, ex);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -804,8 +810,9 @@ namespace v2rayN.Handler
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Utils.SaveLog(ex.Message, ex);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -849,8 +856,9 @@ namespace v2rayN.Handler
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Utils.SaveLog(ex.Message, ex);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1040,8 +1048,9 @@ namespace v2rayN.Handler
|
||||||
|
|
||||||
msg = string.Format(ResUI.SuccessfulConfiguration, node.GetSummary());
|
msg = string.Format(ResUI.SuccessfulConfiguration, node.GetSummary());
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Utils.SaveLog(ex.Message, ex);
|
||||||
msg = ResUI.FailedGenDefaultConfiguration;
|
msg = ResUI.FailedGenDefaultConfiguration;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -1091,8 +1100,9 @@ namespace v2rayN.Handler
|
||||||
|
|
||||||
boundStreamSettings(node, "in", inbound.streamSettings);
|
boundStreamSettings(node, "in", inbound.streamSettings);
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Utils.SaveLog(ex.Message, ex);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1112,8 +1122,9 @@ namespace v2rayN.Handler
|
||||||
v2rayConfig.outbounds[0].settings = null;
|
v2rayConfig.outbounds[0].settings = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Utils.SaveLog(ex.Message, ex);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1258,8 +1269,9 @@ namespace v2rayN.Handler
|
||||||
vmessItem.streamSecurity = Global.StreamSecurity;
|
vmessItem.streamSecurity = Global.StreamSecurity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Utils.SaveLog(ex.Message, ex);
|
||||||
msg = ResUI.IncorrectClientConfiguration;
|
msg = ResUI.IncorrectClientConfiguration;
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -1403,8 +1415,9 @@ namespace v2rayN.Handler
|
||||||
vmessItem.streamSecurity = Global.StreamSecurity;
|
vmessItem.streamSecurity = Global.StreamSecurity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Utils.SaveLog(ex.Message, ex);
|
||||||
msg = ResUI.IncorrectClientConfiguration;
|
msg = ResUI.IncorrectClientConfiguration;
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -1472,7 +1485,10 @@ namespace v2rayN.Handler
|
||||||
{
|
{
|
||||||
lstIpEndPoints = new List<IPEndPoint>(IPGlobalProperties.GetIPGlobalProperties().GetActiveTcpListeners());
|
lstIpEndPoints = new List<IPEndPoint>(IPGlobalProperties.GetIPGlobalProperties().GetActiveTcpListeners());
|
||||||
}
|
}
|
||||||
catch { }
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Utils.SaveLog(ex.Message, ex);
|
||||||
|
}
|
||||||
|
|
||||||
log(configCopy, ref v2rayConfig, false);
|
log(configCopy, ref v2rayConfig, false);
|
||||||
//routing(config, ref v2rayConfig);
|
//routing(config, ref v2rayConfig);
|
||||||
|
@ -1548,8 +1564,9 @@ namespace v2rayN.Handler
|
||||||
//msg = string.Format(ResUI.SuccessfulConfiguration"), node.getSummary());
|
//msg = string.Format(ResUI.SuccessfulConfiguration"), node.getSummary());
|
||||||
return Utils.ToJson(v2rayConfig);
|
return Utils.ToJson(v2rayConfig);
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Utils.SaveLog(ex.Message, ex);
|
||||||
msg = ResUI.FailedGenDefaultConfiguration;
|
msg = ResUI.FailedGenDefaultConfiguration;
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue