Groups
A "group" is a group of users that have access to the same services. Users can create and manage groups, and invite other users to join them. This allows you to share services with other users.
The user who creates a group is automatically assigned the role of "admin" of the group, and can invite other users to join the group.
Creating a Group
Create a group using the webrelay group create command. Here's an example:
webrelay group create -n mygroup
- To list all the groups you are a member of you can use the
webrelay group listcommand. - To see all users in a group you can use the
webrelay group users -n <group-name>command. - To delete a group you can use the
webrelay group delete -n <group-name>command.
Inviting Users to a Group
To invite a user to a group you can use the webrelay group invite -n <group-name> -u <user-email> command.
The user will receive an email invitation to join the group. Once they accept the invitation, they will be able to access all the services in the group.
Removing Users from a Group
To remove a user from a group you can use the webrelay group remove -n <group-name> -u <user-email> command.
Listing Group services
To list all the services in a group you can use the webrelay service list --group <group-name> command.
Starting a Service for a group to use
Use the webrelay service start with the --group flag to start a service for a group to use. Here is an example:
Here is an example:
webrelay service start -n mydatabase -p 5432 -t tcp --group mygroup
In the above command:
-n mydatabasetells Webrelay to assign the name "mydatabase" to this service.-p 5432indicates that the service is running on TCP port 5432.-t tcpspecifies the protocol used by the service, in this case, TCP, You can use tcp or http.--group mygrouptells Webrelay to make this service available to the "mygroup" group.
Accessing a Service
To connect to the service you must use the webrelay client command with the --group flag.
Here is an example:
webrelay client -n mydatabase -p 9005 --group mygroup
In the above command:
-n mydatabasetells Webrelay to use the service named "mydatabase".-p 9005binds the local port 9005 to the service. You can use any port number you like.--group mygrouptells Webrelay to that the service is owned by the "mygroup" group.