Skip to content

Commit

Permalink
fix 443
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaming Network committed May 20, 2024
1 parent 95cf484 commit aeeb93a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion PVE/Service/pveproxy.pm
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ sub init {
die "unable to open lock file '${accept_lock_fn}' - $!\n";

my $listen_ip = $proxyconf->{LISTEN_IP};
my $socket = $self->create_reusable_socket(8006, $listen_ip);
my $socket = $self->create_reusable_socket(443, $listen_ip);

my $dirs = {};

Expand Down
2 changes: 1 addition & 1 deletion bin/pvebanner
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $xline
Welcome to the Proxmox Virtual Environment. Please use your web browser to
configure this server - connect to:
https://${localip}:8006/
https://${localip}/
$xline
Expand Down
4 changes: 2 additions & 2 deletions spice-example-sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fi

NODE="${NODE%%\.*}"

DATA="$(curl -f -s -S -k --data-urlencode "username=$USERNAME" --data-urlencode "password=$PASSWORD" "https://$PROXY:8006/api2/json/access/ticket")"
DATA="$(curl -f -s -S -k --data-urlencode "username=$USERNAME" --data-urlencode "password=$PASSWORD" "https://$PROXY/api2/json/access/ticket")"

echo "AUTH OK"

Expand All @@ -73,6 +73,6 @@ CSRF="${CSRF##*CSRFPreventionToken:}"
CSRF="${CSRF%%,*}"
CSRF="${CSRF%%\}*}"

curl -f -s -S -k -b "PVEAuthCookie=$TICKET" -H "CSRFPreventionToken: $CSRF" "https://$PROXY:8006/api2/spiceconfig/nodes/$NODE/qemu/$VMID/spiceproxy" -d "proxy=$PROXY" > spiceproxy
curl -f -s -S -k -b "PVEAuthCookie=$TICKET" -H "CSRFPreventionToken: $CSRF" "https://$PROXY/api2/spiceconfig/nodes/$NODE/qemu/$VMID/spiceproxy" -d "proxy=$PROXY" > spiceproxy

exec remote-viewer spiceproxy
2 changes: 1 addition & 1 deletion test/perftest2.pl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
# but we can simply create a ticket if we are root
my $ticket = PVE::AccessControl::assemble_ticket('root@pam');

my $cmd = "ab -c 10 -n 1000 -k -C 'PVEAuthCookie=$ticket' https://$hostname:8006/api2/json";
my $cmd = "ab -c 10 -n 1000 -k -C 'PVEAuthCookie=$ticket' https://$hostname/api2/json";
print "$cmd\n";
system($cmd) == 0 || die "command failed - $!\n";
2 changes: 1 addition & 1 deletion test/perftest3.pl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ sub test_rpc {
for (my $i = 0; $i < $qcount; $i++) {
eval {
my ($page, $response, %reply_headers)
= get_https($host, 8006, '/api2/json',
= get_https($host, '/api2/json',
make_headers(Cookie => "PVEAuthCookie=$ticket"));
die "$response\n" if $response !~ m/200 OK/;
};
Expand Down

0 comments on commit aeeb93a

Please sign in to comment.