client/remote: add support to specify port number
this adds the ability to add port numbers in the backup repo spec as well as remotes, so that user that are behind a NAT/Firewall/Reverse proxy can still use it also adds some explanation and examples to the docs to make it clearer for h2 client i left the localhost:8007 part, since it is not configurable where we bind to Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
committed by
Dietmar Maurer
parent
729d41fe6a
commit
ba20987ae7
@ -62,10 +62,10 @@ fn connect() -> Result<HttpClient, Error> {
|
||||
let ticket = Ticket::new("PBS", Userid::root_userid())?
|
||||
.sign(private_auth_key(), None)?;
|
||||
options = options.password(Some(ticket));
|
||||
HttpClient::new("localhost", Userid::root_userid(), options)?
|
||||
HttpClient::new("localhost", 8007, Userid::root_userid(), options)?
|
||||
} else {
|
||||
options = options.ticket_cache(true).interactive(true);
|
||||
HttpClient::new("localhost", Userid::root_userid(), options)?
|
||||
HttpClient::new("localhost", 8007, Userid::root_userid(), options)?
|
||||
};
|
||||
|
||||
Ok(client)
|
||||
@ -410,6 +410,7 @@ pub fn complete_remote_datastore_name(_arg: &str, param: &HashMap<String, String
|
||||
|
||||
let client = HttpClient::new(
|
||||
&remote.host,
|
||||
remote.port.unwrap_or(8007),
|
||||
&remote.userid,
|
||||
options,
|
||||
)?;
|
||||
|
Reference in New Issue
Block a user