socket-based proxy program

socket-based proxy program

Post by cbd.. » Fri, 15 Oct 1999 04:00:00



This is probably a frequent requerment, so I thought I'd ask here before
I re-invent another wheel.

We are using GDB to remotely debug processes. GDB runs on UNIX box 'A'
and GDB-Server runs on UNIX box B. GDB connects to GDB Server via a
socket.

However, in our configuration, a process on A can not establish a direct
connection to B, so a third machine C is used between the two which CAN
connect to both.

We therefore need a small proxy program which runs on the third machine
It waits for a socket connection from A and makes a socket connection to
B, and thus establishes a transparent connection between A (gdb) and B
(gdbserver).

I don't know very much about implementing sockets, but it strikes me
that there *must* be some sample code or a ready-made proxy program
source code somewhere on the net.

Can anyone suggest where I might find it?

(Incidentally the program will eventually need to service a second socet
connection aswell - I suppose this will be implemented in a second
thread.)

Thanks

Colin

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

socket-based proxy program

Post by Mark Woodi » Wed, 20 Oct 1999 04:00:00



> I don't know very much about implementing sockets, but it strikes me
> that there *must* be some sample code or a ready-made proxy program
> source code somewhere on the net.

I'm sure there are loads of port-forwarding things.  I've written one
myself, as an exercise and as a test of my library; it's since gathered
too many features, as is the way of these things.  You can find the code
at

  http://www.excessus.demon.co.uk/misc-hacks/index.html#fw

Quote:> (Incidentally the program will eventually need to service a second socet
> connection aswell - I suppose this will be implemented in a second
> thread.)

It can forward an arbitrary number of connections between sockets (both
IP and Unix domains), normal files and executable programs.  There are
options for logging, access control, connection limiting and far too
much other stuff.

Quick example of the syntax.  To set up a server which listens on port
1234 and forwards connections to otherhost port 4321, do

  fw from 1234 to otherhost:4321

[Licence is GNU GPL; uses Autoconf to configure itself; big manual page
which I believe describes everything.]

-- [mdw]

 
 
 

1. Looking for home based Linux LKM and socket based application project

My cousin is in School now, he instgalled RH based Linux PC, would like
to do some Linux Project, with simple loadable kernel module and some
application should access that module using socket, this way the kernel
module loading and debugging, as well as socket application program can
be written, can somebody suggest us how to do this. Basically wants to
learn Linux Kernel programming. Also is there any Pseudo driver
availble in Linux (Or Loop around driver which is available in STREAMS
Programming).

In socket prog, will it be only one socket for both sides communication
or do I need two sockets (for example in standard FTP, will it use only
one socket for Tx abd Rx, Or is it two different sockets). Thanks.

2. HTTPD Install

3. Strange crash with a socket-based server

4. SMC 8216C Ultra 16 NIC

5. passing floats in inet socket-based IPC

6. When I say Shell Script... what do I mean?

7. Terminating socket-based connections?

8. fvwm ButtonStyle's..

9. Question(s) on socket-based multi-client server

10. Socket-based ncurses/termcap/terminfo?

11. Socket-based communications

12. Socket-based multi-computer execution tool

13. SUMMARY: Passing floats in inet socket-based IPC