Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Rdpgw
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirror
Rdpgw
Commits
8876b044
Commit
8876b044
authored
4 years ago
by
Bolke de Bruin
Browse files
Options
Downloads
Patches
Plain Diff
Allow default domain
parent
c6cfdc4d
Branches
v1.0-stable
Branches containing commit
Tags
v1.0.3
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
api/web.go
+3
-4
3 additions, 4 deletions
api/web.go
config/configuration.go
+1
-0
1 addition, 0 deletions
config/configuration.go
dev/docker/docker-compose.yml
+1
-13
1 addition, 13 deletions
dev/docker/docker-compose.yml
main.go
+1
-0
1 addition, 0 deletions
main.go
with
6 additions
and
17 deletions
api/web.go
+
3
−
4
View file @
8876b044
...
...
@@ -43,6 +43,7 @@ type Config struct {
BandwidthAutoDetect
int
ConnectionType
int
SplitUserDomain
bool
DefaultDomain
string
}
func
(
c
*
Config
)
NewApi
()
{
...
...
@@ -158,16 +159,14 @@ func (c *Config) HandleDownload(w http.ResponseWriter, r *http.Request) {
host
=
strings
.
Replace
(
host
,
"{{ preferred_username }}"
,
userName
,
1
)
// split the username into user and domain
var
user
string
var
domain
str
in
g
var
user
=
userName
var
domain
=
c
.
DefaultDoma
in
if
c
.
SplitUserDomain
{
creds
:=
strings
.
SplitN
(
userName
,
"@"
,
2
)
user
=
creds
[
0
]
if
len
(
creds
)
>
1
{
domain
=
creds
[
1
]
}
}
else
{
user
=
userName
}
render
:=
user
...
...
This diff is collapsed.
Click to expand it.
config/configuration.go
+
1
−
0
View file @
8876b044
...
...
@@ -58,6 +58,7 @@ type ClientConfig struct {
ConnectionType
int
UsernameTemplate
string
SplitUserDomain
bool
DefaultDomain
string
}
func
init
()
{
...
...
This diff is collapsed.
Click to expand it.
dev/docker/docker-compose.yml
+
1
−
13
View file @
8876b044
...
...
@@ -33,16 +33,4 @@ services:
volumes
:
-
${PWD}/xrdp_users.txt:/root/createusers.txt
environment
:
TZ
:
"
Europe/London"
rdpgw
:
build
:
.
ports
:
-
9443:9443
restart
:
on-failure
depends_on
:
-
keycloak
healthcheck
:
test
:
[
"
CMD"
,
"
curl"
,
"
-f"
,
"
http://keycloak:8080"
]
interval
:
30s
timeout
:
10s
retries
:
10
TZ
:
"
Europe/Amsterdam"
This diff is collapsed.
Click to expand it.
main.go
+
1
−
0
View file @
8876b044
...
...
@@ -77,6 +77,7 @@ func main() {
BandwidthAutoDetect
:
conf
.
Client
.
BandwidthAutoDetect
,
ConnectionType
:
conf
.
Client
.
ConnectionType
,
SplitUserDomain
:
conf
.
Client
.
SplitUserDomain
,
DefaultDomain
:
conf
.
Client
.
DefaultDomain
,
}
api
.
NewApi
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment