Jump to content

dummzeuch

Members
  • Content Count

    2836
  • Joined

  • Last visited

  • Days Won

    101

dummzeuch last won the day on November 10

dummzeuch had the most liked content!

Community Reputation

1505 Excellent

Technical Information

  • Delphi-Version
    Delphi 10.2 Tokyo

Recent Profile Visitors

28203 profile views
  1. dummzeuch

    ssh tunnel with ssh-pascal

    No dice either. Still the same error message. Sorry, I am too tired to be of much help here.
  2. dummzeuch

    ssh tunnel with ssh-pascal

    I found my bug: I had for testing purposes changed the RemoteHost to one that requires different credentials, so log on failed. Now, having changed that back, the tunneling Remote Desktop works as expected. So your change works for me too. Thanks a lot! As for parallel connections: The unmodified LocalForward demo works for two different browsers in parallel. But after closing the second browser I get ESshError "LibSSh2 error: Unable to send channel-open request (-7), on API "libssh2_channeld_direct_tcpip_ex" in SshTunnel, line 170. This then happens every time I try to connect to http://localhost:12345/success.txt So there still seems to be something amiss.
  3. I have actually been using this "feature" when I needed an event handler but didn't have an object ready, by declaring a local variable of a simple class type declared just for this purpose, setting it to nil (just to shut up the compiler) and assigning its method to the event. That method simply doesn't do anything that requires self to have a value, so it works fine (it also must not be virtual). No constructor/destructor calls required and also no memory leak created. Alternatively one could create a plain procedure with the right signature, assign that to the code pointer of a TMethod record, leave the data pointer unassigned or set it to nil, and assign that record to the event using appropriate type casting. But that somehow feels hackier than the nil object instance.
  4. But you can easily check for nil, while that's not possible for "uninitialized". And you can also easily spot them in the debugger. Also, referencing a non-initialized object reference does not necessarily result in an access violation, while referencing nil definitely does.
  5. dummzeuch

    ssh tunnel with ssh-pascal

    Hm, I must have broken something. It compiles, but it doesn't work at all. I'll have a closer look later.
  6. dummzeuch

    Buying a mini pc to install Delphi

    There is also Mouse Without Borders, now part of Windows Power Toys, which has a similar functionality, but is Windows only. But as Alberto just clarified: He needs a different functionality, so this won't help. Regarding KVM switches: I found them a bit too pricey for just a convenience so I do the same as Anders and use the multiple input ports of my monitor(s) to connect my computers and switch between them using the monitor's on screen menu. My keyboard has two USB ports so I connect the mouse to the keyboard and just need to plug in the keyboard's USB cable into the computer I am currently using. (A separate USB hub would offer the same "convenience" at much less cost than a KVM switch). Also, I can have one of my monitors show the display of one computer and the other the display of the second one, if I need that. I don't know whether KVM switches allow that nowadays. Of course that always depends on the use case: If you want to switch frequently, a KVM switch may be worthwhile. But then maybe Remote Desktop or Synergy / Mouse Without Borders could be a better solution.
  7. dummzeuch

    12.2 Instability

    I can understand why you do that, but it kind of defeats the purpose of a form designer. I hope you filed bug reports for the offending components.
  8. dummzeuch

    ssh tunnel with ssh-pascal

    I'll test your changes as soon as I am awake properly and had breakfast. edit: It seems to work. I can connect to the web server using multiple browser instances sequentially without restarting the LocalForward demo. I haven't looked at the code yet. I'll try to change my Remote Desktop forwarding tool to use your new code. edit: Nope, doesn't work. After logon, while the Remote Desktop confirmation dialog is being shown An exception "Windows socket error: An existing connection was forcibly closed by the remote host (10054), API 'recv'" occurs in SshTunnel, Line 170, which aborts the listening the thread. Afterwards of course no further connections are being accepted. A web server has multiple connections on the same port, doesn't it? So does ssh itself. Or a database server. A simple use case would be if you want to test some page on a web server using different browsers in parallel.
  9. dummzeuch

    ssh tunnel with ssh-pascal

    @pyscripter see my latest pull request for some helpful debug output options This currently requires a hack using TMethod because LocalForward.Main is not an object. Would it be OK, if I made it a method of a TLocalForward object and create that in the Main procedure?
  10. dummzeuch

    ssh tunnel with ssh-pascal

    I just tried sshexec on my home Linux "server" and it worked now. It also automatically took my ssh key from Pageant. Hm, I just tried to simply request a web page through the tunnel twice in a row, but apparently the browser keeps the connection open even if I close that tab. I had to wait for a timeout. for a request to fail. But closing the whole browser window rather than just the tab worked. The connection will be closed and when retrying in a new window the request will fail.
  11. dummzeuch

    ssh tunnel with ssh-pascal

    I used 3 different branches, but I guess the mistake was merging those changes into my master branch and creating new branches for the other changes from my master branch which already contained the changes from the first branch. I'll try it differently next time. Thanks for merging.
  12. dummzeuch

    ssh tunnel with ssh-pascal

    I have submitted 3 pull requests (none solving that problem yet), but I have been doing something wrong: The branches from which I created the pull requests contain more commits than expected.
  13. dummzeuch

    ssh tunnel with ssh-pascal

    I can't promise anything, but if I get it to work, I'll submit one.
  14. dummzeuch

    ssh tunnel with ssh-pascal

    Basically the problem I am facing here is the same as issue#11 reported on GitHub, only that I have two connections one after another and the person who opened that issue has them in parallel. And that's rather difficult to fix based on the current structure because TSshTunnel.ForwardLocalPort is executed completely in one thread. In order for this to work, there must be one thread that calls select on ListenSock and then starts another thread whenever there is a connection to the socket and let that thread handle the forwarding from it until that connection is closed. The original thread must then again call select on ListenSock. This would handle multiple connections serially and in parallel.
×