Re: [twsocket] TCP Bridges (Dennis Siggaard)

2016-04-18 Thread Wilfried Mestdagh

Hi Dennis,

SocketSpy works that way. If a client opens 6 sessions then SocketSpy 
will open 6 sessions to the other server using 6 TWSocket created on the 
fly.


Met vriendelijke groeten,
Wilfried Mestdagh

Op 17-04-16 om 15:57 schreef IT+NET - Dennis Siggaard:

Hi Wilfried,


I have already looked at the SocketSpy example once, but this time I got it to 
work, Thanks :)

But I got one last problem, that I am not sure can be solved at all ?


The PC2 webserver is listening (OK)
The PC2 TWSocketLocal can connect to the PC2 Webserver (ok)
The PC2 TWSocketExt can connect to PC1 TWSocketServerExt (ok)
The PC2 TCP bridge is working both ways (ok) (I see the right traffic flowing 
both ways)

The PC1 TWSocketServerExt is listening (OK)
The PC1 TWSocketServerLocal is listening (OK)
The PC1 TCP bridge is working both ways (ok) (I see the right traffic flowing 
both ways)

When I telnet to PC1:80 then everything seems to be okey traffic is flowing 
perferctly in both TCP bridges, but... surprise.

When I use a webbrowser to connect to PC1:80, it creates multiply connections 
to PC1:80. (6 connections at the same time)

>From my point of view, it would be impossible to bridge these (extra) 
connections, because there will always only be ONE connection (PC2 TWSocketExt 
connect to PC1 TWSocketServerExt)

Is this an dead end, or can you see something that I can't ?
I really spend many hours to get to this point. :(

Dennis.


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TCP Bridges (Dennis Siggaard)

2016-04-17 Thread Angus Robertson - Magenta Systems Ltd
> When I use a webbrowser to connect to PC1:80, it creates multiply 
> connections to PC1:80. (6 connections at the same time)

I didn't really follow your original requirement or PC1/PC2 stuff, but
I believe you are effectively writing a 'reverse proxy' and it needs to
support multiple connections between source and destination.  

So the proxy needs to based on TWSocketServer so it can accept multiple
connections, with each client having it's own TWSocket for the remote
connection.  That way your six connections from the browser will all
connect in parallel.   

There is a 10 year old ICS reverse proxy project here:

https://sourceforge.net/projects/pxy/?source=directory

It needs updating to ICSv8 (source file names have changed), and has
some problems relating to lack of any buffering.  But it essentially
works.  

I used it as the basis of a commercial HTTPS proxy project, although in
retrospect there is virtually none of this code left in the final
product and starting from scratch would have been faster. 

Angus

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] TCP Bridges (Dennis Siggaard)

2016-04-17 Thread IT+NET - Dennis Siggaard
Hi Wilfried,


I have already looked at the SocketSpy example once, but this time I got it to 
work, Thanks :)

But I got one last problem, that I am not sure can be solved at all ?


The PC2 webserver is listening (OK)
The PC2 TWSocketLocal can connect to the PC2 Webserver (ok)
The PC2 TWSocketExt can connect to PC1 TWSocketServerExt (ok)
The PC2 TCP bridge is working both ways (ok) (I see the right traffic flowing 
both ways)

The PC1 TWSocketServerExt is listening (OK)
The PC1 TWSocketServerLocal is listening (OK)
The PC1 TCP bridge is working both ways (ok) (I see the right traffic flowing 
both ways)

When I telnet to PC1:80 then everything seems to be okey traffic is flowing 
perferctly in both TCP bridges, but... surprise.

When I use a webbrowser to connect to PC1:80, it creates multiply connections 
to PC1:80. (6 connections at the same time)

>From my point of view, it would be impossible to bridge these (extra) 
>connections, because there will always only be ONE connection (PC2 TWSocketExt 
>connect to PC1 TWSocketServerExt)

Is this an dead end, or can you see something that I can't ?
I really spend many hours to get to this point. :(

Dennis.
 

-Oprindelig meddelelse-
Fra: TWSocket [mailto:twsocket-boun...@lists.elists.org] På vegne af 
twsocket-requ...@lists.elists.org
Sendt: 17. april 2016 13:00
Til: twsocket@lists.elists.org
Emne: TWSocket Digest, Vol 648, Issue 6

Send TWSocket mailing list submissions to
twsocket@lists.elists.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
or, via email, send a message with subject or body 'help' to
twsocket-requ...@lists.elists.org

You can reach the person managing the list at
twsocket-ow...@lists.elists.org

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of TWSocket digest..."


Today's Topics:

   1. Re: TCP Bridges. (Wilfried Mestdagh)


--

Message: 1
Date: Sun, 17 Apr 2016 10:37:33 +0200
From: Wilfried Mestdagh <wilfr...@mestdagh.biz>
To: twsoc...@elists.org
Subject: Re: [twsocket] TCP Bridges.
Message-ID: <57134b4d.3030...@mestdagh.biz>
Content-Type: text/plain; charset=windows-1252; format=flowed

Hi,

If I understand your question then you need a listening TCP server that connect 
to another TCP server and bridge all traffic between the 2 sessions.

Use TWSocketServer for the listening part and when a client connect to it then 
create per client another session with TWSocket. You can use SocketSpy as an 
example how to do this:
http://www.mestdagh.biz/index.html?redirTo=soft_frame_intro.html=/soft_freeware.html

Met vriendelijke groeten,
Wilfried Mestdagh

Op 15-04-16 om 16:15 schreef IT+NET - Dennis Siggaard:
> Scenario:
>
> PC1: (IP: 192.168.1.100)
>
> Delphi application running 2 listenener at port  and at port 80
>
> Problem: Application set up a ICS both-way communication link between port 80 
> and .
>
>
>
> PC2: (IP: 192.168.1.200)
>
> Delphi application running a nons-ICS webservice listening at port .
>
> Problem: Application makes a ICS connection to PC1 at port  and after 
> that sets up a ICS both-way communication link between local port  and 
> the connection to PC1.
>
>
>
> I want this result: At PC1: In a webbrowser, 
> http://127.0.0.1:80<http://127.0.0.1/> shows the Webservice of PC2 
> port 
>
> I know there are other and easier ways to do this, but I have to be exactly 
> as I have described.
>
> How can I make the two "bridges" with ICS and what components should I use ?
>
> Thanks.
>



--

Subject: Digest Footer

___
To unsubscribe or change your settings for TWSocket mailing list please goto 
http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

--

End of TWSocket Digest, Vol 648, Issue 6


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TCP Bridges.

2016-04-17 Thread Wilfried Mestdagh

Hi,

If I understand your question then you need a listening TCP server that 
connect to another TCP server and bridge all traffic between the 2 sessions.


Use TWSocketServer for the listening part and when a client connect to 
it then create per client another session with TWSocket. You can use 
SocketSpy as an example how to do this:

http://www.mestdagh.biz/index.html?redirTo=soft_frame_intro.html=/soft_freeware.html

Met vriendelijke groeten,
Wilfried Mestdagh

Op 15-04-16 om 16:15 schreef IT+NET - Dennis Siggaard:

Scenario:

PC1: (IP: 192.168.1.100)

Delphi application running 2 listenener at port  and at port 80

Problem: Application set up a ICS both-way communication link between port 80 
and .



PC2: (IP: 192.168.1.200)

Delphi application running a nons-ICS webservice listening at port .

Problem: Application makes a ICS connection to PC1 at port  and after that 
sets up a ICS both-way communication link between local port  and the 
connection to PC1.



I want this result: At PC1: In a webbrowser, 
http://127.0.0.1:80 shows the Webservice of PC2 port 

I know there are other and easier ways to do this, but I have to be exactly as 
I have described.

How can I make the two "bridges" with ICS and what components should I use ?

Thanks.



--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] TCP Bridges.

2016-04-15 Thread IT+NET - Dennis Siggaard
Scenario:

PC1: (IP: 192.168.1.100)

Delphi application running 2 listenener at port  and at port 80

Problem: Application set up a ICS both-way communication link between port 80 
and .



PC2: (IP: 192.168.1.200)

Delphi application running a nons-ICS webservice listening at port .

Problem: Application makes a ICS connection to PC1 at port  and after that 
sets up a ICS both-way communication link between local port  and the 
connection to PC1.



I want this result: At PC1: In a webbrowser, 
http://127.0.0.1:80 shows the Webservice of PC2 port 

I know there are other and easier ways to do this, but I have to be exactly as 
I have described.

How can I make the two "bridges" with ICS and what components should I use ?

Thanks.

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be