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:
parent
72c245c26d
commit
2a3a0458c9
@ -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'
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user