Giter VIP home page Giter VIP logo

Comments (44)

StormHub avatar StormHub commented on August 29, 2024 1

tls is all about open connections and negotiate then encrypt. It has to happen in the beginning, that makes it very hard to do some 'just plug it in'. Why not wait a while for net core 2.0. I am going to do it one way or another.

from netuv.

StormHub avatar StormHub commented on August 29, 2024 1

I plan to branch up and try plain ssl stream very soon.

from netuv.

StormHub avatar StormHub commented on August 29, 2024

Libuv by itself does not implement ssl, however, there are few libuv-ssl packages using open ssl packages. They all have pros and cons, I have not quite decided what to port over yet. That been said, ssl definitely is going to come at some point. My development cycle at the moment is waiting for net core 2.0 first then go from there.

from netuv.

StormHub avatar StormHub commented on August 29, 2024

I will give net core 2.0 ssl stream a shot before looking into other solutions.

from netuv.

seertenedos avatar seertenedos commented on August 29, 2024

from netuv.

StormHub avatar StormHub commented on August 29, 2024

You mean establishing connection in ssl, then let libuv take over?

from netuv.

seertenedos avatar seertenedos commented on August 29, 2024

from netuv.

StormHub avatar StormHub commented on August 29, 2024

The way you describing is exactly what .net core 2.0 pipeline is supposed to do. That was one the reasons I am waiting for it. Meanwhile, net core 2.0 also has the latest libuv 1.10. I suppose we just have to wait for a bit stable realease of net core 2.0. It is too early to do anything now, some of the spec are constantly changing at the moment.

from netuv.

seertenedos avatar seertenedos commented on August 29, 2024

from netuv.

StormHub avatar StormHub commented on August 29, 2024

Put it this way, basically you have to give up buffer management to bring in ssl stream, which is kind of defeating the purpose of buffer pooling. It is doable now but not ideal.

from netuv.

StormHub avatar StormHub commented on August 29, 2024

.net core 2.0 has pipeline which solves this problem in a much more elegant way.

from netuv.

seertenedos avatar seertenedos commented on August 29, 2024

from netuv.

StormHub avatar StormHub commented on August 29, 2024

It is not that far away, it is preview2 now, release is in autumn, about 2 - 3 month. pipeline only available in 2.0. I have been watching that for months now.

from netuv.

seertenedos avatar seertenedos commented on August 29, 2024

from netuv.

seertenedos avatar seertenedos commented on August 29, 2024

Think i found what you are waiting on. It is System.IO.Pipelines.Networking.Libuv right? https://github.com/dotnet/corefxlab/tree/master/src/System.IO.Pipelines.Networking.Libuv

from netuv.

StormHub avatar StormHub commented on August 29, 2024

That one is experimental and internally used by kestrel server with libuv tcp handle.

from netuv.

seertenedos avatar seertenedos commented on August 29, 2024

Is there another one somewhere else that you were talking about? Can you provide a link. In my case it is just a personal project for improving my systems at home but the client connections it makes out to the internet must be SSL so was thinking to keep the server using your lib as that works really well but maybe write the client to use what you were talking about in coming in core 2 so i could even use the preview version for now if i need to go that far as your libs will hopefully run on it.

from netuv.

StormHub avatar StormHub commented on August 29, 2024

Mainly released version of https://github.com/dotnet/corefxlab/tree/master/src/System.IO.Pipelines
It is not that simple to convert, requires fair bit of work to fit in.

from netuv.

seertenedos avatar seertenedos commented on August 29, 2024

ok but is it even a part of core2? I did find https://dotnet.myget.org/feed/dotnet-corefxlab/package/nuget/System.IO.Pipelines.Networking.Libuv and standard pipelines is there as well and they only seem to need .NETStandard 1.3 so i may just need to add a new nuget server. I would need to adjust my client code a little as well as work out how to connect up the ssl still in the client

from netuv.

StormHub avatar StormHub commented on August 29, 2024

The corefxlab libuv pipeline does not support tls.

from netuv.

StormHub avatar StormHub commented on August 29, 2024

You have to build everything from scratch. But with the pipelining, it is much easier.

from netuv.

seertenedos avatar seertenedos commented on August 29, 2024

I think i get it. I would need to create a class that does basically the same thing as SSLStream but over an IPipeConnection and it needs to implement that interface as well so i can put it inline. Using a StreamPipeConnection may make it easier as well. Hopefully this will not be too hard but last time i had rip apart SSLStream to support selecting ssl certificate based on hostname it was a bit of a pain.

from netuv.

StormHub avatar StormHub commented on August 29, 2024

Most of the implementations relying on new classes such as span, memory buffers. Too much of dependencies to pull over individually.

from netuv.

seertenedos avatar seertenedos commented on August 29, 2024

from netuv.

StormHub avatar StormHub commented on August 29, 2024

Please let me know how it goes. I plan to do this once net core 2 going into a reasonably stable state I can start over with new classes.

from netuv.

seertenedos avatar seertenedos commented on August 29, 2024

from netuv.

seertenedos avatar seertenedos commented on August 29, 2024

First tip if you want to use System.IO.Pipelines.Networking.Libuv you actually need to add 2 nuget repositories to get everything to install in current version of dotnet in netstandard 1.3 library.

For piplines etc
https://dotnet.myget.org/F/dotnet-corefxlab/api/v3/index.json
for dependancies
https://dotnet.myget.org/F/dotnet-core/api/v3/index.json

i will let you know how i go once i build my client with ssl

from netuv.

seertenedos avatar seertenedos commented on August 29, 2024

pipelines are very similar to normal sockets but just a little harder to use. One of the major downsides i found at the minute is the nuget package published and the samples checked in wont work together. methods have changed so it may not be usable yet sadly. I thought they were just tweaking implementations but this is core things like reading the data that seems to have changed as far as i can tell.

from netuv.

StormHub avatar StormHub commented on August 29, 2024

That one intensively use new io memory namespace and new span which is not available yet (only in net core 2.0). That is the reason I am waiting at the moment. The nightly packages tend to change a lot. Not something you can reliably code against.

from netuv.

seertenedos avatar seertenedos commented on August 29, 2024

from netuv.

seertenedos avatar seertenedos commented on August 29, 2024

from netuv.

oliverw avatar oliverw commented on August 29, 2024

@StormHub Out of curiosity. Do you have a rough idea how to implement this now that .Net Core 2.0 is out?

from netuv.

StormHub avatar StormHub commented on August 29, 2024

NetUV is going to stay on net standard 1.6 for quite some time. There are few options for ssl, for instance
https://github.com/Drawaes/Leto
Or open to the libuv approach, see
libuv/libuv#1128

from netuv.

StormHub avatar StormHub commented on August 29, 2024

Another option will be managed ssl stream from .net. I haven't completely made my mind yet.

from netuv.

seertenedos avatar seertenedos commented on August 29, 2024

from netuv.

StormHub avatar StormHub commented on August 29, 2024

Tls will be added for sure. The question is SslStream or openSsl at the moment.

from netuv.

seertenedos avatar seertenedos commented on August 29, 2024

from netuv.

StormHub avatar StormHub commented on August 29, 2024

SslStream is not quite there yet.
see https://github.com/aspnet/KestrelHttpServer/tree/dev/src/Kestrel.Tls

from netuv.

oliverw avatar oliverw commented on August 29, 2024

@StormHub And update on this? I need to support TLS pretty soon and right now none the options discussed in this thread sound relatively painless. 😅

from netuv.

oliverw avatar oliverw commented on August 29, 2024

@StormHub Would be nice if you could keep us updated on this

from netuv.

seertenedos avatar seertenedos commented on August 29, 2024

from netuv.

StormHub avatar StormHub commented on August 29, 2024

Well, I will try sslstream first and see how it goes

from netuv.

oliverw avatar oliverw commented on August 29, 2024

Is this still on the roadmap? :)

from netuv.

StormHub avatar StormHub commented on August 29, 2024

@oliverw I am not sure when to jump on 2.0 at the moment :)

from netuv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.