Re: [pve-devel] External noVNC without proxmox panel login

2015-05-08 Thread Daniel Hunsaker
The Proxmox API needs a way to know which user is attempting to access it so it can handle permissions appropriately. The login process (via web UI or otherwise) provides a ticket that can be used in subsequent requests to provide this information to the API. You still need to obtain this ticket

[pve-devel] [PATCH 2/2] listen on ipv6 if the node's hostname resolves to ipv6

2015-05-08 Thread Wolfgang Bumiller
--- bin/pveproxy | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/pveproxy b/bin/pveproxy index fe25a80..386 100755 --- a/bin/pveproxy +++ b/bin/pveproxy @@ -26,6 +26,8 @@ use PVE::ExtJSIndex5; use PVE::NoVncIndex; use PVE::TouchIndex; +use PVE::Tools; + use bas

[pve-devel] [PATCH 1/2] HTTPServer.pm: accept ip6 connections

2015-05-08 Thread Wolfgang Bumiller
--- PVE/HTTPServer.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/HTTPServer.pm b/PVE/HTTPServer.pm index 6395bdd..b991fe9 100755 --- a/PVE/HTTPServer.pm +++ b/PVE/HTTPServer.pm @@ -1504,8 +1504,8 @@ sub accept_connections { } if (my $sin =

[pve-devel] [PATCH 0/2] pve-manager: ipv6 support for pveproxy

2015-05-08 Thread Wolfgang Bumiller
HTTPServer now uses the unpack_sockaddr_in{,6} wrapper provided by the previous patch set for pve-common's Tools.pm to successfully unpack ipv6 addresses, it can now successfully serve sites to ipv6 clients. pveproxy now resolves its own nodename in order to decide whether to listen on ipv4 or ipv

[pve-devel] External noVNC without proxmox panel login

2015-05-08 Thread proxmox
Hey, Currently I'm trying to create an external VNC connection using the HTML VNC application 'noVNC'. I'm using the ProxMox API commands 'vncproxy' and 'vncwebsocket' which almost work perfectly. One problem tho. The connection only works when I'm logged in into the proxmox web panel, while this

[pve-devel] [PATCH 3/4] optional socket family parameter for create_reusable_socket

2015-05-08 Thread Wolfgang Bumiller
--- src/PVE/Daemon.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PVE/Daemon.pm b/src/PVE/Daemon.pm index 0d0e16b..ddbe656 100644 --- a/src/PVE/Daemon.pm +++ b/src/PVE/Daemon.pm @@ -782,7 +782,7 @@ sub register_status_command { # some useful helper sub create_reus

[pve-devel] [PATCH 2/4] provide Tools::unpack_sockaddr_in46

2015-05-08 Thread Wolfgang Bumiller
--- src/PVE/Tools.pm | 9 + 1 file changed, 9 insertions(+) diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm index d886a3d..75ca5a6 100644 --- a/src/PVE/Tools.pm +++ b/src/PVE/Tools.pm @@ -4,6 +4,7 @@ use strict; use warnings; use POSIX qw(EINTR); use IO::Socket::IP; +use Socket qw(AF_

[pve-devel] [PATCH 1/4] Use IO::Socket::IP instead of INET

2015-05-08 Thread Wolfgang Bumiller
--- src/PVE/Daemon.pm | 6 +++--- src/PVE/Tools.pm | 12 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/PVE/Daemon.pm b/src/PVE/Daemon.pm index 264f8be..0d0e16b 100644 --- a/src/PVE/Daemon.pm +++ b/src/PVE/Daemon.pm @@ -24,7 +24,7 @@ use PVE::INotify; use POSIX

[pve-devel] [PATCH 4/4] add utility to fetch the socket family for a hostname

2015-05-08 Thread Wolfgang Bumiller
--- src/PVE/Tools.pm | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm index 75ca5a6..0e1af09 100644 --- a/src/PVE/Tools.pm +++ b/src/PVE/Tools.pm @@ -4,7 +4,7 @@ use strict; use warnings; use POSIX qw(EINTR); use IO::Socket::IP

[pve-devel] [PATCH 0/4] pve-common: ipv6 changes

2015-05-08 Thread Wolfgang Bumiller
IPv6 related changes and helpers added. I added two helpers to Tools.pm I'm using in pve-manager: a) a wrapper around Socket::unpack_sockaddr_in and its _in6 variant chosen based on the address family, and returning the family together with the unpacked result. (Used in the manager's HTTPServer.

[pve-devel] [PATCH 2/2] use freeaddrinfo on getaddrinfo results when done

2015-05-08 Thread Wolfgang Bumiller
--- data/src/pmxcfs.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/data/src/pmxcfs.c b/data/src/pmxcfs.c index be90618..684bc51 100644 --- a/data/src/pmxcfs.c +++ b/data/src/pmxcfs.c @@ -693,6 +693,7 @@ lookup_node_ip(const char *nodename) char buf[INET6

[pve-devel] [PATCH 1/2] ipv6 support for lookup_node_ip

2015-05-08 Thread Wolfgang Bumiller
--- data/src/pmxcfs.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/data/src/pmxcfs.c b/data/src/pmxcfs.c index a461165..be90618 100644 --- a/data/src/pmxcfs.c +++ b/data/src/pmxcfs.c @@ -690,6 +690,7 @@ create_symlinks(cfs_plug_base_t *bplug, const char *nodename

[pve-devel] [PATCH 0/2] pve-cluster: pmxcfs ipv6 check

2015-05-08 Thread Wolfgang Bumiller
added the ipv6 equivalent for the loopback interface check (checking for ::1), and added the missing freeaddrinfo call (as getaddrinfo allocates a linked list the user has to free themselves.) Wolfgang Bumiller (2): ipv6 support for lookup_node_ip use freeaddrinfo on getaddrinfo results when d