Граф коммитов

41 Коммитов

Автор SHA1 Сообщение Дата
Simon Tatham 52bdffbfe0 More preparatory work: remove the <windows.h> include from lots of
source files in which it's no longer required (it was previously
required in anything that included <putty.h>, but not any more).
Also moved a couple of stray bits of exposed WinSock back into
winnet.c (getservbyname from ssh.c and AF_INET from proxy.c).

[originally from svn r2160]
2002-10-30 17:57:31 +00:00
Simon Tatham 4756c15fc9 Yet more global-removal. The static variables in logging.c are now
absent, and also (I think) all the frontend request functions (such
as request_resize) take a context pointer, so that multiple windows
can be handled sensibly. I wouldn't swear to this, but I _think_
that only leaves the Unicode stuff as the last stubborn holdout.

[originally from svn r2147]
2002-10-26 12:58:13 +00:00
Simon Tatham 79fa4f8cd6 Use memcpy rather than strncpy in sk_addrcopy! How did that happen?
[originally from svn r1968]
2002-09-20 17:54:17 +00:00
Simon Tatham 5331956c07 SOCKS proxy support added (next instalment of Justin Bradford's
proxy work). SOCKS 5 username/password authentication still
unsupported.

[originally from svn r1622]
2002-04-27 15:01:18 +00:00
Simon Tatham 36d125e1d7 Attempt to ensure that everything passed to connection_fatal() is
also logged to the Event Log, so that it's easy to cut-and-paste the
error message afterwards.

[originally from svn r1599]
2002-03-23 18:04:27 +00:00
Simon Tatham eabd704d1e Justin Bradford's proxy support patch. Currently supports only HTTP
CONNECT, but contains an extensible framework to allow other
proxies. Apparently SOCKS and ad-hoc-telnet-proxy are already
planned (the GUI mentions them already even though they don't work
yet). GUI includes full configurability and allows definition of
exclusion zones. Rock and roll.

[originally from svn r1598]
2002-03-23 17:47:21 +00:00
Simon Tatham dac0d45699 Ensure our network layer is properly cleaned up before PuTTY exits.
Specifically, we explicitly closesocket() all open sockets, which
appears to be necessary since otherwise Windows sends RST rather
than FIN. I'm _sure_ that's a Windows bug, but there we go.

[originally from svn r1574]
2002-03-06 20:13:22 +00:00
Simon Tatham 5f2c53790c Fix compiler warnings
[originally from svn r1469]
2001-12-11 18:47:35 +00:00
Simon Tatham 3270c74f9e Configurable TCP_NODELAY option on network connections
[originally from svn r1428]
2001-11-29 21:47:11 +00:00
Simon Tatham 555ded7740 Fix the `SERIOUS NETWORK INTERNAL ERROR' oversight in winnet.c. See
the comment in try_send() for details of the problem.

[originally from svn r1335]
2001-10-28 09:57:47 +00:00
Simon Tatham f8547bdefb Due to fears that an incompetent WinSock might allow localhost-
listening sockets to be talked to by non-local hosts, reinstate the
explicit peer address check on connection acceptance.

[originally from svn r1306]
2001-10-12 19:32:13 +00:00
Simon Tatham b9d9b4951f Modify the FIXME into a calculated risk. I don't like this, but I
don't like the thought of having to try to fix it either,
particularly when I can't tell whether it'll work or not without
reproducing the (probably phantom) problem. Gah. I wish WinSock
would give better documentation of possible error returns.

[originally from svn r1260]
2001-09-09 15:41:58 +00:00
Simon Tatham f08de20a1e Robert de Bath's asynchronous-connect patch. Helps a lot in port
forwarding; improves Event Log; and causes the PuTTY window to
appear earlier in the setup process.

[originally from svn r1239]
2001-09-07 22:39:01 +00:00
Simon Tatham 25c58b71d1 Fix the intermittent fault in the socket layer that was occasionally
bombing out X forwarding. It turns out to be a workaround for YET
ANOTHER useless WinSock implementation. Arrgh!

[originally from svn r1232]
2001-09-05 22:04:19 +00:00
Simon Tatham 4692974d7d Port forwarding update: local-host-only listening sockets are now
done properly (by binding to INADDR_LOOPBACK) instead of hackishly
(by binding to INADDR_ANY, looking at the peer address when a
connection is accepted, and slamming the connection shut at that
point).

[originally from svn r1215]
2001-08-27 15:59:37 +00:00
Simon Tatham c87fa98d09 Extensive changes that _should_ fix the socket buffering problems,
by ceasing to listen on input channels if the corresponding output
channel isn't accepting data. Has had basic check-I-didn't-actually-
break-anything-too-badly testing, but hasn't been genuinely tested
in stress conditions (because concocting stress conditions is non-
trivial).

[originally from svn r1198]
2001-08-25 17:09:23 +00:00
Simon Tatham 50766ce729 SSH port forwarding! How cool is that?
Only currently works on SSH1; SSH2 should be doable but it's late
and I have other things to do tonight. The Cool Guy award for this
one goes to Nicolas Barry, for doing most of the work and actually
understanding the code he was adding to.

[originally from svn r1176]
2001-08-08 20:44:35 +00:00
Simon Tatham fb473cc16c Placate gcc's `-Wall' warnings.
[originally from svn r1121]
2001-05-13 14:02:28 +00:00
Simon Tatham c2eb57a034 `realhost', passed back from all the backend init functions, was
scoped within those functions. It's now dynamically allocated.

[originally from svn r1108]
2001-05-09 14:01:15 +00:00
Simon Tatham 3730ada5ce Run entire source base through GNU indent to tidy up the varying
coding styles of the various contributors! Woohoo!

[originally from svn r1098]
2001-05-06 14:35:20 +00:00
Simon Tatham 8695ee2def Remove my dire-warning `FIXME' in IPv4 dotted-decimal handling
because Jeroen points out that it's perfectly OK the way it is :-)

[originally from svn r1080]
2001-04-28 11:24:45 +00:00
Simon Tatham 03c9b6107b Replace PuTTY's 2-3-4 tree implementation with the shiny new counted
one, in preparation for using it to speed up scrollback.

[originally from svn r1053]
2001-04-16 17:18:24 +00:00
Simon Tatham cc100b5676 Increase the read buffer size in network processing for extra speed.
[originally from svn r1047]
2001-04-16 12:25:03 +00:00
Simon Tatham dfb9893509 David Brinegar's workaround for an error reporting problem in some
WinSocks.

[originally from svn r1004]
2001-03-15 13:25:48 +00:00
Simon Tatham 7b0e082700 Dave Hinton's modifications to the network layer interface, which
should make it possible to add SSL support later.

[originally from svn r996]
2001-03-13 10:22:45 +00:00
Simon Tatham 60585cff9c Yet another attempt at OOB handling in the network abstraction. This
version allows you to specify, per socket, which sockets receive OOB
data in-line (so that you know what was before the mark and what was
after) and which receive it out of line (so it's really a one-byte
out-of-band facility rather than discard-to-mark). This reflects the
fact that rlogin appears to make more sense in the latter mode, and
telnet in the former. This patch makes rlogin work right for me.

[originally from svn r921]
2001-02-01 14:11:04 +00:00
Simon Tatham ee154f7ed3 Don't forget to read any outstanding data on receipt of FD_CLOSE.
Particularly useful for people speaking HTTP, Finger etc over raw
connections.

[originally from svn r913]
2001-01-29 15:10:56 +00:00
Simon Tatham 930fcdadeb Robert de Bath's TCP Urgent / Telnet SYNCH patch.
[originally from svn r912]
2001-01-29 14:49:21 +00:00
Simon Tatham 89505459e3 Improve socket error handling so that a socket error isn't an
automatic fatalbox(). Instead, the error is passed to the receiver
routine, which can decide just how fatal the problem really is.

[originally from svn r894]
2001-01-24 10:11:18 +00:00
Simon Tatham 4a339ef430 Add X11 forwarding, mainly thanks to Andreas Schultz
[originally from svn r878]
2001-01-22 11:34:52 +00:00
Simon Tatham ca90be26a8 Experimental Rlogin support, thanks to Delian Delchev. Local flow
control is unsupported, and server-to-client comms may fail for want
of working TCP Urgent.

[originally from svn r875]
2001-01-19 10:10:37 +00:00
Simon Tatham cd9bab9b52 Remove rogue debug statement
[originally from svn r855]
2001-01-11 13:19:11 +00:00
Simon Tatham 3f7bf81cf6 IPv4 numeric addresses were broken thanks to IPv6 patch
[originally from svn r854]
2001-01-09 17:25:06 +00:00
Simon Tatham c57d524298 Jeroen Massar's IPv6 patch. Disabled by default, for now.
[originally from svn r849]
2001-01-07 19:16:16 +00:00
Simon Tatham d3f120884c Apply improved WinSock error handling to the few situations it still
hadn't been applied to.

[originally from svn r827]
2000-12-18 09:20:26 +00:00
Simon Tatham d5240d4157 Make memory management uniform: _everything_ now goes through the
smalloc() macros and thence to the safemalloc() functions in misc.c.
This should allow me to plug in a debugging allocator and track
memory leaks and segfaults and things.

[originally from svn r818]
2000-12-12 10:33:13 +00:00
Simon Tatham 8fff1e4821 Fix a segfault (addr->error was unpredictable following a dotted-dec lookup)
[originally from svn r768]
2000-10-26 08:25:43 +00:00
Simon Tatham 384eeb3f76 Fix miscellaneous compiler warnings. Thanks to Jacob Nevins
[originally from svn r755]
2000-10-24 10:47:49 +00:00
Simon Tatham 36156d858c Improved entropy gathering.
[originally from svn r750]
2000-10-23 15:20:05 +00:00
Simon Tatham b5c41a473b Oops. A field like `sending_oob' in the Socket structure really
deserves to be initialised to something sane at creation time.

[originally from svn r748]
2000-10-23 12:31:54 +00:00
Simon Tatham 988c1974ea Created a shiny new abstraction for the socket handling. Has many
advantages:
 - protocol modules can call sk_write() without having to worry
   about writes blocking, because blocking writes are handled in the
   abstraction layer and retried later.
 - `Lost connection while sending' is a thing of the past.
 - <winsock.h> is no longer needed in most modules, because
   "putty.h" doesn't have to declare `SOCKET' variables any more,
   only the abstracted `Socket' type.
 - select()-equivalent between multiple sockets will now be handled
   sensibly, which opens the way for things like SSH port
   forwarding.

[originally from svn r745]
2000-10-23 11:55:11 +00:00