Skip to content

ForwardedPortRemote incredibly slow #185

@Gdocal

Description

@Gdocal

Hi
I am using SSH.NET to make remote port forwarding. I use created tunnel for http proxy and proxy works incredibly slow, it takes 20 times more time to load some usual page though SHH.NET comparing with putty tunnel. What can be done to increase performance?

Activity

drieseng

drieseng commented on Mar 1, 2017

@drieseng
Member

What version of SSH.NET are you using?

Gdocal

Gdocal commented on Mar 1, 2017

@Gdocal
Author

hi. sorry my bad
SSH.Net version 2016.0.0.0

drieseng

drieseng commented on Mar 1, 2017

@drieseng
Member

I don't think much has improved since, and - to be honest - I don't immediately see areas where we can easily improve performance.

I'll try to find time to reproduce this issue.

Gdocal

Gdocal commented on Mar 1, 2017

@Gdocal
Author

Do I need to help to setup environment? I can give you immediately two servers: one with Windows Server where you can setup your tests, and one with linux where SSH server configured.
Do you use multiplexing for tunneling?
Difference is really huge, so there should be something what can be improved.

Gdocal

Gdocal commented on Mar 1, 2017

@Gdocal
Author

To reproduce issue you need to have
-Server #1
Program with SSH.Net client
Putty client ( to see difference)
Any proxy software: Fiddler, 3proxy for example
-Server #2
With any ssh server configure on it
-Any other pc to make requests #3

  1. Code to be exected on Server stable release #1
    SSH.Net code:
    var server="";
    var boundPort=3577;
    var localHost="127.0.0.1";
    var localPort=3578;
    ForwardedPortRemote port = new ForwardedPortRemote(server, boundPort, "127.0.0.1",localPort);

  2. Proxy on Server stable release #1 should listen on port 3578

  3. Setup firefox or any other browser with use next proxy: : 3577

try to access page like https://whatismyipaddress.com/ which make a lot of requests to get fully loaded.

then make connection to ssh trought putty to see difference.

you can use this addon to see difference clearly. https://addons.mozilla.org/ru/firefox/addon/apptelemetry/

drieseng

drieseng commented on Mar 1, 2017

@drieseng
Member

We're not using multiplexing.
I'll try to find time, but I'm afraid this will not happen any time soon.

Gdocal

Gdocal commented on Mar 3, 2017

@Gdocal
Author

https://github.com/Azure/azure-relay-dotnet/tree/dev/samples/portbridge/PortBridge
maybe this can help, there is implementation of multiplexing tcp conection

keyoti

keyoti commented on Apr 14, 2017

@keyoti
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @drieseng@Gdocal@keyoti

        Issue actions

          ForwardedPortRemote incredibly slow · Issue #185 · sshnet/SSH.NET