3xworkaround
Version:
This is an interface for 3x-ui panel. It will help developers to create, edit and delete inbounds and clients in a simple way.
22 lines (21 loc) • 696 B
JavaScript
export const parseInbound = (inbound) => {
if (typeof inbound.settings === "string") {
if (inbound.settings === "")
inbound.settings = {};
else
inbound.settings = JSON.parse(inbound.settings);
}
if (typeof inbound.streamSettings === "string") {
if (inbound.streamSettings === "")
inbound.streamSettings = {};
else
inbound.streamSettings = JSON.parse(inbound.streamSettings);
}
if (typeof inbound.sniffing === "string") {
if (inbound.sniffing === "")
inbound.sniffing = {};
else
inbound.sniffing = JSON.parse(inbound.sniffing);
}
return inbound;
};