Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
comms
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor 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
xx network
comms
Commits
afaee6e9
Commit
afaee6e9
authored
2 years ago
by
Jonah Husson
Browse files
Options
Downloads
Patches
Plain Diff
Add comments & fixes from mr
parent
55f38103
No related branches found
No related tags found
3 merge requests
!39
Merge release into master
,
!34
Update to use modified client, add params for relevant options, enable use of tls with web conn
,
!32
Project/channels
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
connect/comms.go
+2
-0
2 additions, 0 deletions
connect/comms.go
connect/webConn.go
+19
-2
19 additions, 2 deletions
connect/webConn.go
with
21 additions
and
2 deletions
connect/comms.go
+
2
−
0
View file @
afaee6e9
...
...
@@ -236,9 +236,11 @@ func (c *ProtoComms) ServeWithWeb() {
jww
.
ERROR
.
Printf
(
"Failed to serve HTTP: %v"
,
err
)
}
}
else
{
// Configure tls for this listener, using the config from http.ServeTLS
tlsConf
:=
&
tls
.
Config
{}
tlsConf
.
NextProtos
=
append
(
tlsConf
.
NextProtos
,
"http/1.1"
)
tlsConf
.
Certificates
=
make
([]
tls
.
Certificate
,
1
)
// Our internal certificates may not pass standard verification
tlsConf
.
InsecureSkipVerify
=
true
var
err
error
tlsConf
.
Certificates
[
0
],
err
=
tls
.
X509KeyPair
(
c
.
pubKeyPem
,
rsa
.
CreatePrivateKeyPem
(
c
.
privateKey
))
...
...
This diff is collapsed.
Click to expand it.
connect/webConn.go
+
19
−
2
View file @
afaee6e9
...
...
@@ -9,9 +9,26 @@ import (
"time"
)
// WebConnParam struct holds parameters used
// for establishing a grpc-web connection
// The params are used when estabilishing the http connection
type
WebConnParam
struct
{
/* HTTP Transport config options */
// TLSHandshakeTimeout specifies the maximum amount of time waiting to
// wait for a TLS handshake. Zero means no timeout.
TlsHandshakeTimeout
time
.
Duration
// IdleConnTimeout is the maximum amount of time an idle
// (keep-alive) connection will remain idle before closing
// itself.
// Zero means no limit.
IdleConnTimeout
time
.
Duration
// ExpectContinueTimeout, if non-zero, specifies the amount of
// time to wait for a server's first response headers after fully
// writing the request headers if the request has an
// "Expect: 100-continue" header. Zero means no timeout and
// causes the body to be sent immediately, without
// waiting for the server to approve.
// This time does not include the time to send the request header.
ExpectContinueTimeout
time
.
Duration
}
...
...
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