Comments (10)
Did you ever find a solution to this? I'm having a similar problem
from gun.
Yes, the fix has not been incorporated but you can use my fork if you like or pester the maintainer to include the fix :-). The diff is very small. https://github.com/jbevemyr/gun
There are two commits in my fork that solves the problem.
jbevemyr@fdd196c
jbevemyr@6d0ee4f
from gun.
You do not need to modify Gun to do this, you can just provide the transport options when you open the connection.
Edit: I will go over the PRs once I am done with my current work, shouldn't take more than a few more weeks now.
from gun.
@essen That sounds great, can you give me a hint on how to do that?
from gun.
Something like this
CustomFun = public_key:pkix_verify_hostname_match_fun(https),
TransOpts = [{customize_hostname_check, [{match_fun, CustomFun}]}],
ConnectionOpts = #{transport => tls, tls_opts => TransOpts},
gun:open(Host, Port, ConnectionOpts)
If you are using Erlang.
from gun.
Does anything need to be done in Gun with regard to this? Can we close this?
from gun.
I think the gun should be changed to use the public_key:pkix_verify_hostname_match_fun(https) fun to check hostnames since that is the expected behaviour when using https.
from gun.
Can that be set without setting any other TLS option? Considering Gun currently does not verify certificates by default and I don't think this will change in 2.0.
from gun.
Right, that is true. Don't know if it can be set separately.
from gun.
OK. Considering the limited time I have I will leave this ticket open and see this after 2.0. I think it would be a good idea for Gun to optionally be fully configured for TLS, perhaps using the same library Hackney has, but it needs work. Let's keep this ticket open for visibility.
from gun.
Related Issues (20)
- gun:connect expects proxy server to reply with HTTP/1.1, some servers respond with HTTP/1.0 HOT 3
- gun 2.0 RC ready? HOT 7
- HTTP2 gun_down event only delivered the connection owner but not to streams HOT 2
- Exposing HTTP2 "additional debug data" in received GOAWAY frames HOT 4
- [Bug] shutdown sends GOAWAY with reason internal error HOT 4
- Crash during termination when connecting to a server requiring mTLS over HTTP/2 HOT 17
- Feature: Response callback fun HOT 4
- Add stream idle timeout HOT 2
- Websocket upgrade fails on unix socket HOT 4
- function not exported {gun_http,ws_send,6} HOT 3
- Downgrade response time HTTP-2 after 1.3.0 to 2.0.1 HOT 26
- client_preferred_next_protocols is incompatible with TLS 1.3 HOT 1
- Types not exported - dialyzer fails
- timeout to connect to ws.postman-echo.com:443 HOT 6
- {:stream_error, :protocol_error, :"Stream reset by server."} HOT 5
- gun:open times out in OTP/26 for tls if tls options are not set HOT 9
- Update erlang.mk to support OTP 27 HOT 1
- Document gotchas using Gun from multiple entities using HTTP/2
- Connection process stopped handling requests HOT 11
- Can this client (or any?) make multiple concurrent outbound requests? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gun.