0
0
mirror of https://github.com/bobwen-dev/htpdate synced 2025-04-11 23:00:44 +02:00

add option insecure

Allow insecure server connections when using SSL
This commit is contained in:
Bob Wen 2021-01-29 14:10:34 +08:00
parent 72c245c26d
commit 2a3a0458c9
2 changed files with 12 additions and 0 deletions

View File

@ -56,6 +56,9 @@ htpdate -s www.pool.ntp.org
-i, --interval The minimum milliseconds between requests
Default: 500
-k, --insecure Allow insecure server connections when using SSL
Default: false
-m, --method HTTP method
Default: 'HEAD'

View File

@ -53,6 +53,12 @@ argv = require('./argv') {
default: 6000
type: 'number'
}
insecure: {
describe: 'Allow insecure server connections when using SSL'
alias: 'k'
default: false
type: 'boolean'
}
command: {
describe: 'Command to adjust system time, in https://day.js.org/ display format'
alias: 'C'
@ -84,6 +90,9 @@ req_opt = {
headers: {
'user-agent': argv['user-agent']
}
https: {
rejectUnauthorized: not argv.insecure
}
}