Add --type option for services across all 42 implementations
Support service_type for SRV records (minecraft, mumble, teamspeak, source, tcp, udp). Each implementation now parses --type and sends service_type in the JSON payload.
This commit is contained in:
parent
564e9e7075
commit
eb5d4ca8bf
42 changed files with 783 additions and 104 deletions
5
un.js
5
un.js
|
|
@ -325,6 +325,7 @@ async function cmdService(args) {
|
|||
const payload = { name: args.name };
|
||||
if (args.ports) payload.ports = args.ports.split(',').map(p => parseInt(p.trim()));
|
||||
if (args.domains) payload.domains = args.domains.split(',');
|
||||
if (args.serviceType) payload.service_type = args.serviceType;
|
||||
if (args.bootstrap) {
|
||||
if (fs.existsSync(args.bootstrap)) {
|
||||
payload.bootstrap = fs.readFileSync(args.bootstrap, 'utf-8');
|
||||
|
|
@ -436,6 +437,9 @@ function parseArgs(argv) {
|
|||
} else if (arg === '--domains' && i + 1 < argv.length) {
|
||||
args.domains = argv[++i];
|
||||
i++;
|
||||
} else if (arg === '--type' && i + 1 < argv.length) {
|
||||
args.serviceType = argv[++i];
|
||||
i++;
|
||||
} else if (arg === '--bootstrap' && i + 1 < argv.length) {
|
||||
args.bootstrap = argv[++i];
|
||||
i++;
|
||||
|
|
@ -514,6 +518,7 @@ Service options:
|
|||
--name NAME Service name
|
||||
--ports PORTS Comma-separated ports
|
||||
--domains DOMAINS Custom domains
|
||||
--type TYPE Service type for SRV records (minecraft, mumble, teamspeak, source, tcp, udp)
|
||||
--bootstrap CMD Bootstrap command/file
|
||||
-l, --list List services
|
||||
--info ID Get service details
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue