Skip to content

Commit 435d052

Browse files
committed
move TLS up one document "level"
1 parent 4467132 commit 435d052

1 file changed

Lines changed: 20 additions & 19 deletions

File tree

docs/guidebook.rst

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,25 @@ and received on the wire::
337337

338338
telnetlib3-client --loglevel=trace --logfile=debug.log bbs.example.com
339339

340+
server_binary.py
341+
~~~~~~~~~~~~~~~~
342+
343+
https://github.com/jquast/telnetlib3/blob/master/bin/server_binary.py
344+
345+
A shell callback that echoes client input as hex bytes.
346+
Demonstrates using ``encoding=False`` on :func:`~telnetlib3.server.create_server`
347+
for raw byte I/O.
348+
349+
.. literalinclude:: ../bin/server_binary.py
350+
:language: python
351+
:lines: 22-32
352+
353+
Run with::
354+
355+
telnetlib3-server --encoding=false --shell=bin.server_binary.shell
356+
340357
TLS / SSL
341-
~~~~~~~~~
358+
---------
342359

343360
Telnet over TLS (TELNETS, IANA port 992) secures the connection using
344361
standard TLS encryption. The TLS handshake is handled at the transport
@@ -369,7 +386,8 @@ Or programmatically::
369386

370387
For production, use certificates from Let's Encrypt or another trusted CA.
371388

372-
**Mixed TLS / plain telnet (auto-detect)**
389+
Mixed TLS / plain telnet (auto-detect)
390+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
373391

374392
Add ``--tls-auto`` to accept both TLS and plain telnet clients on the same
375393
port. The server peeks at the first byte of each connection: a TLS
@@ -449,23 +467,6 @@ Run with::
449467
telnetlib3-server --ssl-certfile cert.pem --ssl-keyfile key.pem \
450468
--shell=bin.server_tls.shell
451469

452-
server_binary.py
453-
~~~~~~~~~~~~~~~~
454-
455-
https://github.com/jquast/telnetlib3/blob/master/bin/server_binary.py
456-
457-
A shell callback that echoes client input as hex bytes.
458-
Demonstrates using ``encoding=False`` on :func:`~telnetlib3.server.create_server`
459-
for raw byte I/O.
460-
461-
.. literalinclude:: ../bin/server_binary.py
462-
:language: python
463-
:lines: 22-32
464-
465-
Run with::
466-
467-
telnetlib3-server --encoding=false --shell=bin.server_binary.shell
468-
469470
Blocking Interface
470471
==================
471472

0 commit comments

Comments
 (0)