WIP
Signed-off-by: Vasiliy Doylov <nekocwd@mainlining.org>
This commit is contained in:
parent
00bf38752f
commit
44e2a90336
3 changed files with 8 additions and 8 deletions
|
@ -27,9 +27,9 @@ class Singularity.Outbound.Trojan : Dial, Json.Serializable {
|
||||||
public int64 server_port { get; set; default = 1080; }
|
public int64 server_port { get; set; default = 1080; }
|
||||||
public string password { get; set; default = null; }
|
public string password { get; set; default = null; }
|
||||||
public string network { get; set; default = null; }
|
public string network { get; set; default = null; }
|
||||||
public Transport.Transport transport { owned get; owned set; default = null; }
|
public Transport.Transport transport { get; set; default = null; }
|
||||||
|
|
||||||
public TLS tls { owned get; owned set; default = null; }
|
public TLS tls { get; set; default = null; }
|
||||||
/*
|
/*
|
||||||
* public Multiplex multiplex { get; set; default = null; }
|
* public Multiplex multiplex { get; set; default = null; }
|
||||||
* TODO: Implement Multiplex
|
* TODO: Implement Multiplex
|
||||||
|
@ -42,8 +42,8 @@ class Singularity.Outbound.Trojan : Dial, Json.Serializable {
|
||||||
public override Json.Node serialize_property (string property_name, GLib.Value value, GLib.ParamSpec pspec) {
|
public override Json.Node serialize_property (string property_name, GLib.Value value, GLib.ParamSpec pspec) {
|
||||||
var node = default_serialize_property (property_name, value, pspec);
|
var node = default_serialize_property (property_name, value, pspec);
|
||||||
if (property_name == "transport" && transport != null) {
|
if (property_name == "transport" && transport != null) {
|
||||||
// Utils.fix_type (ref node);
|
Utils.fix_type (ref node);
|
||||||
// Utils.fix_dash (ref node);
|
Utils.fix_dash (ref node);
|
||||||
}
|
}
|
||||||
if (property_name == "tls" && tls != null) {
|
if (property_name == "tls" && tls != null) {
|
||||||
Utils.fix_dash (ref node);
|
Utils.fix_dash (ref node);
|
||||||
|
|
|
@ -29,8 +29,8 @@ class Singularity.Outbound.Vless : Dial, Json.Serializable {
|
||||||
public string flow { get; set; default = null; }
|
public string flow { get; set; default = null; }
|
||||||
public string network { get; set; default = null; }
|
public string network { get; set; default = null; }
|
||||||
public TLS tls { get; set; default = null; }
|
public TLS tls { get; set; default = null; }
|
||||||
public string packet_encoding { owned get; owned set; default = null; }
|
public string packet_encoding { get; set; default = null; }
|
||||||
public Transport.Transport transport { owned get; owned set; default = null; }
|
public Transport.Transport transport { get; set; default = null; }
|
||||||
/*
|
/*
|
||||||
* public Multiplex multiplex { get; set; default = null; }
|
* public Multiplex multiplex { get; set; default = null; }
|
||||||
* TODO: Implement Multiplex
|
* TODO: Implement Multiplex
|
||||||
|
|
|
@ -48,11 +48,11 @@ namespace Singularity.Utils {
|
||||||
|
|
||||||
var obj = node.get_object();
|
var obj = node.get_object();
|
||||||
if (obj.has_member(TYPE_NAME_SRC)) {
|
if (obj.has_member(TYPE_NAME_SRC)) {
|
||||||
var type_name = obj.get_member(TYPE_NAME_SRC);
|
var type_name = obj.get_member(TYPE_NAME_SRC).copy();
|
||||||
obj.set_member(TYPE_NAME_DST, type_name);
|
obj.set_member(TYPE_NAME_DST, type_name);
|
||||||
obj.remove_member(TYPE_NAME_SRC);
|
obj.remove_member(TYPE_NAME_SRC);
|
||||||
} else if (obj.has_member(TYPE_NAME_DST)) {
|
} else if (obj.has_member(TYPE_NAME_DST)) {
|
||||||
var type_name = obj.get_member(TYPE_NAME_DST);
|
var type_name = obj.get_member(TYPE_NAME_DST).copy();
|
||||||
obj.set_member(TYPE_NAME_SRC, type_name);
|
obj.set_member(TYPE_NAME_SRC, type_name);
|
||||||
obj.remove_member(TYPE_NAME_DST);
|
obj.remove_member(TYPE_NAME_DST);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue