<div dir="ltr">Thanks for the feedback!<div><br></div><div>You are correct in assuming that sctPT uses SCTP in the most "TCP-like" manner. This nullifies some of SCTP's features, but one-to-one SCTP seemed more familiar at the time and thus was easier to implement.</div><div><br></div><div>I am relatively sure SCTP functionality exists in Go, but whether it is a third-party library, or a simple socket option is unbeknownst to me.</div><div><br></div><div>At the moment, I am not further pursuing this project's development, but finding out whether SCTP has any utility in regard to censorship circumvention appears to be an open question.</div><div><br></div><div>Thanks again,</div><div>Alex</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 14, 2021 at 2:50 PM David Fifield <<a href="mailto:david@bamsoftware.com">david@bamsoftware.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, Aug 12, 2021 at 12:07:05PM -0500, Alexander Mages wrote:<br>
> The transport is functional but not yet tested with the Tor Browser. I<br>
> prototyped this transport using Ncat for SCTP and Telnet for TCP. It is written<br>
> in Python 3 and SCTP functionality was implemented using C/POSIX-like socket<br>
> parameters, removing the necessity of a third-party library.<br>
> <br>
> A write-up attached to this email denotes functionality, dependencies,<br>
> limitations, and instructions for running the transport.<br>
<br>
Thanks for making this contribution. I was able to get it running with a<br>
few tweaks to the instructions (sent to you separately).<br>
<br>
SCTP adds an interesting design dimension, because there's a separate<br>
layer of streams within the overall TCP connection. As I understand it,<br>
the sctPT client takes an incoming TCP connection and proxies it forward<br>
as a single SCTP stream within a single SCTP connection. (This is how<br>
ncat --sctp works.) An alternative design would be for the sctPT client<br>
to establish a single connection to the sctPT server (it could do this<br>
even before receiving any client TCP connections) and then forward each<br>
incoming connection as a separate stream within that global connection.<br>
See the distinction between the "one-to-one style" and "one-to-many<br>
style" in <a href="https://linux.die.net/man/7/sctp" rel="noreferrer" target="_blank">https://linux.die.net/man/7/sctp</a>.<br>
<br>
As you discovered, pyptlib is unmaintained. It used to be that the<br>
pluggable transports shipped with Tor Browser were written in Python,<br>
but Python proved difficult to deploy and today it's more common to use<br>
Go and goptlib. I am not sure whether it is possible to use SCTP sockets<br>
from Go, but if it is, you can probably easily adapt the "dummy" example<br>
transports from goptlib to use SCTP. (In the one-to-one style, at least;<br>
one-to-many style would require additional refactoring.) You would have<br>
to change the net.Dial("tcp") and net.ListenTCP("tcp") lines:<br>
<a href="https://gitweb.torproject.org/pluggable-transports/goptlib.git/tree/examples/dummy-client/dummy-client.go?h=v1.1.0#n45" rel="noreferrer" target="_blank">https://gitweb.torproject.org/pluggable-transports/goptlib.git/tree/examples/dummy-client/dummy-client.go?h=v1.1.0#n45</a><br>
<a href="https://gitweb.torproject.org/pluggable-transports/goptlib.git/tree/examples/dummy-server/dummy-server.go?h=v1.1.0#n84" rel="noreferrer" target="_blank">https://gitweb.torproject.org/pluggable-transports/goptlib.git/tree/examples/dummy-server/dummy-server.go?h=v1.1.0#n84</a><br>
<br>
> The concept for this transport was derived from this wiki page:<br>
> <a href="https://gitlab.torproject.org/legacy/trac/-/wikis/doc/PluggableTransports/ideas" rel="noreferrer" target="_blank">https://gitlab.torproject.org/legacy/trac/-/wikis/doc/PluggableTransports/ideas</a>.<br>
<br>
I would like to add a link to your work from this page, but<br>
unfortunately since the change in wiki hosting from Trac to Gitlab, I am<br>
not able to edit the page. Maybe we can make a new page under the<br>
anti-censorship namespace.<br>
</blockquote></div>