romshark / webwire-go

A transport independent asynchronous duplex messaging library for Go
MIT License
216 stars 9 forks source link

Add support for https listen #34

Closed SevansD closed 6 years ago

SevansD commented 6 years ago

We can set on front https endpoint, but without any proxy (nginx etc) can not listen https with webwire server. This pr add support for tls listen

coveralls commented 6 years ago

Pull Request Test Coverage Report for Build 324


Changes Missing Coverage Covered Lines Changed/Added Lines %
server.go 5 17 29.41%
<!-- Total: 8 20 40.0% -->
Files with Coverage Reduction New Missed Lines %
message/testutil.go 2 81.36%
<!-- Total: 2 -->
Totals Coverage Status
Change from base Build 323: -0.3%
Covered Lines: 2621
Relevant Lines: 3191

💛 - Coveralls
romshark commented 6 years ago

Currently, to be able to use TLS encryption a custom HTTP server hosting the webwire server must be set up. It's demonstrated in the external example. But It'd probably be a good idea to add a new constructor function with TLS support, like:

func NewSecureServer(
    implementation ServerImplementation,
    opts ServerOptions,
    certFile,
    keyFile string,
)

to newServer.go

SevansD commented 6 years ago

35

romshark commented 6 years ago

35 is now resolved.