Skip to content

Commit

Permalink
Merge pull request #199 from mmkamron/bugfix
Browse files Browse the repository at this point in the history
Expose localhost correctly and better error message
  • Loading branch information
azimjohn authored Apr 12, 2024
2 parents 2f53ea3 + bce88de commit caf9aea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cli/jprqc.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (j *jprqClient) Start(port int, debug bool) {
log.Fatalf(t.Data.ErrorMessage)
}

j.localServer = fmt.Sprintf("127.0.0.1:%d", port)
j.localServer = fmt.Sprintf("localhost:%d", port)
j.remoteServer = fmt.Sprintf("jprq.%s:%d", j.config.Remote.Domain, t.Data.PrivateServer)
j.publicServer = fmt.Sprintf("%s:%d", t.Data.Hostname, t.Data.PublicServer)

Expand Down
2 changes: 1 addition & 1 deletion server/jprq.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (j *Jprq) serveEventConn(conn net.Conn) error {
}
user, err := j.authenticator.Authenticate(request.AuthToken)
if err != nil {
return events.WriteError(conn, "authentication failed")
return events.WriteError(conn, "authentication failed %s", "\n\tobtain auth token from https://jprq.io/auth\n")
}

if _, found := j.allowedUsers[user.Login]; !found {
Expand Down

0 comments on commit caf9aea

Please sign in to comment.