Page MenuHomeFreeBSD

inetd(8): Provide HTTP proxy example using netcat
ClosedPublic

Authored by debdrup on May 10 2020, 7:31 PM.

Details

Summary

One of the fortunes that are included in freebsd-tips talks about how
the superserver can be used to proxy connections with netcat, but there are
no examples provided. This commit adds an example with comment explaining what it does.

Test Plan

Ran igor, only got some probably-erroneous feedback.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

debdrup created this revision.May 10 2020, 7:31 PM
debdrup requested review of this revision.May 10 2020, 7:31 PM
debdrup updated this revision to Diff 71645.EditedMay 11 2020, 7:34 PM

Use -N to close nc again after the file has EOF'd.

This addresses feedback given by AllanJude on IRC.

debdrup updated this revision to Diff 71652.May 11 2020, 8:41 PM

Add comment explaining what the example achieves, add nc(1) to SEE ALSO section

Partially based on further feedback from AllanJude on IRC.

lwhsu added a subscriber: lwhsu.May 11 2020, 10:20 PM

Don't forget update .Dd :-)

debdrup updated this revision to Diff 71677.May 12 2020, 6:53 AM

Fix .Dd nit and nc path nit.

Pointed out by lwshu and kevans respectively.

debdrup retitled this revision from Provide HTTP proxy example using netcat to inetd(8): Provide HTTP proxy example using netcat.May 12 2020, 9:31 PM
debdrup edited the summary of this revision. (Show Details)
This revision was not accepted when it landed; it landed in state Needs Review.May 13 2020, 2:17 AM
This revision was automatically updated to reflect the committed changes.