Chetan Hosmani | 23 May 19:00
Picon

Transport Plugins Update

Hello everyone,

I have been a bit busy last week, and haven't committed much code.
Here are the following refactor changes I have implemented and pushed
to "refactor-1" branch-

1. Added a separate list for transport managers. So we basically have
a list which will contain a manager for every mode. Presently it has
two - opennet and darknet.

2. NodeCrypto functions in the following way-
a. Transport managers are created in the node irrespective of whether
opennet or darknet is running.
b. NodeCrypto on creation for every mode accesses its respective
transport manager to get a list of transports.
c. It runs the method handleNewTransport to initialise a PacketMangler
and handle each transport plugin.
d. If the list of transports is empty, then it will function using the
inherent UDPSocketHandler transport and run normally.
d. When a plugin is loaded (on registering with TransportManager), the
manager checks if the corresponding mode (opennet/darknet) exists and
notifies the NodeCrypto by calling the handleNewTransport method.

3. UDPSocketHandler now extends PacketTransportPlugin, and I have made
changes so that it looks like a plugin. I have built it and checked.
It runs fine.
It also registers in the transport manager.

4. Presently working on replacing the Session keys in the PeerNode
object. There are three - current, previous and unverified. I am not
(Continue reading)

Steve Dougherty | 19 May 23:46
Favicon

Statistics Project Update #4


I've finished a proof of concept for Metropolis-Hastings corrected
probes in Fred. If you are so inclined, please offer feedback on the
patches. [1] Metropolis-Hastings correction was described previously,
[2] and the probes are exposed over FCP. [3] An originating node starts
a probe request by specifying the type of result they're looking for,
and optionally a value for hopsToLive, which currently defaults to its
maximum of 50 if not specified. We will in practice initially use
something closer to 30. One can disable responding to any number of
result types on the Core settings page.

Possible types are:

BANDWIDTH - outgoing bandwidth limit.
BUILD - Freenet build number. (For instance, currently 1407.) Useful
        for measuring update propagation.
IDENTIFIER - endpoint identifier. Useful for improving estimates of
             network size and churn.
LINK_LENGTHS - differences in location between endpoint and each of
               endpoint's peers.
STORE_SIZE - size of datastore.
UPTIME - session uptime and the percentage of the past 48 hours during
         which the endpoint was up.

+/- up to 1% noise is added to bandwidth, link lengths, store size, and
uptime information in an attempt to make the information less
identifiable but still useful for analysis.

Bandwidth, link lengths, store size, and uptime are intended to improve
knowledge of the network so that any problems will hopefully become
(Continue reading)

Ian Clarke | 18 May 18:31
Gravatar

A better FAQ

A friend of mine has created this service: http://helpjuice.com/


It's basically a very smart FAQ that is capable of learning.  Our current FAQ, I think, is somewhat lackluster and intimidating.  My friend has offered to let us use HelpJuice for free - thoughts?  We should be able to integrate it into our site reasonably seamlessly.

Ian.

--
Ian Clarke
Founder, The Freenet Project
Email: ian-RdDMkVZAZeuJnvDnx1genB2eb7JE58TQ@public.gmane.org
_______________________________________________
Devl mailing list
Devl@...
https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
Chetan Hosmani | 15 May 09:13
Picon

Transport Plugins (Update)

Hello,

Sorry for the previous very lengthy update. I'll keep this one short.

After several discussions the basic idea of how I'll implement
transports is now clear.
I have begun writing some basic plugin architecture. The same has been
committed to the branch "refactor-1". I intend to finish, by the end
of this week, refactoring portions of code from NodeCrypto. The main
objective is to remove the "dependence on a single socket object"

Currently I have submitted code on the following new classes-

https://github.com/chetanhosmani/fred-staging/tree/refactor-1

1. TransportManager - This will now contain a list of available
transports (packet transports and stream transports). Transports
register here to let the node know of its availability.
2. TransportPlugin - A base class for the transports
3. StreamTransportPlugin - Base class for stream based transports. It
mainly supports a "connect" method and a "listen" method.
4. PacketTransportPlugin - This is based on PacketSocketHandler itself.

One issue I had was regarding opennet and darknet modes. So I have
extended the plugins so that these methods know the mode of operation
through a boolean. I am not sure if this is okay, though it is a bit
crude. The plugin will provide separate sockets for opennet and
darknet modes. The node side classes only need to mention this through
the "isOpennet" variable.

For the coming week the objective is to remove any "dependence on a
single socket object". So I am working on it in the following way-

Create TransportManager class for a node. Will list all transports
irrespective of darknet and opennet mode. So this means there will be
no issue when opennet is enabled later on.
This will be followed by changing-
NodeCrypto to handle new transports
PeerNode to use new transports

I am sorry I have not been able to update the flog. I will do some
short updates there too.

Regards,
Chetan

toad - Need specific advice on this part.
Scenario 1 - transport plugin added after initialization of nodecrypto
(say darknet).
Scenario 2 - Opennet enabled after transport plugin is loaded.

So transportmanager can be the class in between.

1. To handle new transports plugins coming in-
Transport registers, TransportManager calls on NodeCrypto (maybe
handleNewTransport(...) ) to handle the new transport for opennet and
darknet modes

2. To handle new mode (opennet) after transport plugins are loaded
The new nodecrypto checks for available transports and uses them at
initialization.

So I suppose it is okay to retain UDPSocketHandler as a default when
transports are not yet loaded? I hope this is okay with you?

Also as I mentioned here and on IRC, about using a boolean to
distinguish between opennet and darknet, which the plugin takes care
of. Is that also fine with you?
Do let me know :)
Moses | 13 May 14:36
Picon
Gravatar

Chinese translation for Freenet website

Hi list,

I've made a simplified Chinese translation of some main pages for
Freenet website.

The code is at git://github.com/Mosesofmason/website-staging.git

enjoy.
Ian Clarke | 13 May 06:29
Gravatar

Lantern

Lantern is a great example of how good a Java desktop app *can* look, to try it:


$ git clone git://github.com/getlantern/lantern.git
$ cd lantern
$ ./run.bash

Imagine if Freenet looked that good...

Ian.

--
Ian Clarke
Founder, The Freenet Project
Email: ian-RdDMkVZAZeuJnvDnx1genB2eb7JE58TQ@public.gmane.org
_______________________________________________
Devl mailing list
Devl@...
https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
Steve Dougherty | 12 May 06:23
Favicon

Statistics Project Update #3


I'm still working on the initial implementation of MH-corrected probes
in Fred. I'm pretty close to having minimal functionality working, and
next week I plan to finish up the initial implementation. However, I'm
not happy with the current design, so if anyone would like to take a
look at the bleeding edge of development and possibly offer feedback,
the code is available. [1] This branch is quite rough; before submitting
a pull request or a formal request for review I will rewrite the history
onto another branch with each commit making a reasonable unit of change
along with descriptive commit messages. Which is to say this branch does
not have those properties.

The probes do not have a concept of acknowledgement or two-stage
(propagated) timeouts. The possible outcomes of a probe request are
a timeout, a node participating in the probe being disconnected, (also
not propagated - only occurs for local disconnection) or a set of
results. The possible results are:

-Swap identifier - useful for network population estimates
-Statistics on uptime: session, 48-hour percentage, and 7-day percentage
-Output bandwidth limit
-Datastore size limit
-Link lengths
-Freenet build
-Whether a key is found at the endpoint
-The number of nodes along the trace back on which a key is found

Results like link lengths, bandwidth limit, or store size will have a
small amount of random noise added in an attempt to make them less
identifiable. The originating node requests exactly one type of result.
As the request is routed the HTL is probabilistically decremented, with
a very low probability of decrementing at HTL = 1. This is intended to
make it more difficult to interrogate directly connected nodes by
sending them probe requests with HTL = 1. Each node has a hard limit of
how many probes it can be waiting on at any point in time, and will not
respond to requests beyond that limit. Timeout is proportional to HTL.

The probes are exposed over FCP. A tentative design for the request and
names for responses is available on the wiki. [2] Nodes will be able to
disable any number of these response types, and refusal to respond to a
probe is (intended to be) indistinguishable from a timeout.

Comments and suggestions are very welcome!

Thanks,
operhiem1

[1] https://github.com/thynix/fred-staging/tree/newProbesDev
[2] https://wiki.freenetproject.org/User:Operhiem1/MHProbeFCP
Chetan Hosmani | 5 May 14:14
Picon

Transport Plugins: Update (GSoC 2012)

Hello,

This is an update on the first stage of my project. I have been
working out the details regarding modifications in the core to
simplify the implementation of the transport plugins. This refactoring
stage will involve some minor modifications and some major ones. These
are based on the discussions on #freenet and #freenet-chat. However I
would like to avoid doing changes that would bring about major
differences in the way things function at present.

I have planned to finish refactoring by May 21 (official coding begins
for GSoC). I intend to do that in 3 stages. I have also simultaneously
discussed the entire implementation of transport plugins here. I will
review the feedback and this report, to evaluate what constitutes the
refactoring. After those changes are made I can work on implementing
the needed core level changes, which mostly involve design for
streams.

1) Cryptography and Node

This will involve mainly the classes NodeCrypto and Node. I intend to
make NodeCrypto function purely for keys and not do any network
related task. Presently it also handles binding to the port, selection
of ports for Darknet mode and Opennet mode.
I am considering moving these portions to TransportManager and
PortManager classes.

TransportManager - A registry of registered transports with other
information. Initially I ll dump the refactor changes of UDP into it.
Later on, once UDP is ready as a plugin, along with TCP, it ll be a
generic class for any transport. There will be two objects of this -
one each for opennet and darknet modes.  NodeCrypto e.g. queries
TransportManager to find all the transports' addresses (as strings) to
put in the noderef.

Now UDPSocketHandler is equivalent to a UDP transport plugin, only
it's currently part of the core of freenet. So for the moment
TransportManager can communicate with UDPSocketHandler. That I believe
will be an intermediate step before actually converting
UDPSokcetHandler to a plugin.

PortManager - A registry of all active ports used by freenet - 1) List
of ports on fproxy page 2) List of ports for UPnP
Must contain - 1)Port number 2)Socket(TCP/UDP) 3)Forwarded
4)Description 5)Transport reference
However PortManager is second priority, and will not be addressed if
time does not permit.

Also a major refactoring change would be regarding the fact that
objects no longer take a socket or a port for granted. All queries
must go through the TransportManager. I would need help at certain
places to figure out how this can achieved. For e.g.
NodeCrypto/Node/some other classes assume that an unique darknet port
exists. toad suggested we use a debugging identifier here(some default
number, etc). That makes it simpler for me too.

2) Messages and Packets

These part have been discussed on #freenet(and #freenet-chat) and here
are some issues and conclusions-

a. The existing architecture supports only packet based transports.
The first step would be to draw a clear distinction between
packet-based(connectionless sockets) and stream-based(connection-based
sockets). Thus we will need separate classes for streams(with a base
class for streams and packets), that will handle Message-in-flight and
Packets-in-flight, tracking them, allowing for transports to be
switched midway. This will be handled differently in streams. For
Packets the existing classes can be used, however with modifications
to address the following.

b. For streams we need two features - To handle messages as a whole
entity, and acknowledge once an entire message has been received; and
To support partial messages, if for e.g. we have just switched from
UDP to TCP or we are sending a really large message on TCP.

c. NewPacketFormat currently 1) takes a byte[] from UdpSocketHandler
and decodes it 2) creates and sends a packet. Now the idea is to
create NewStreamFormat that handles streams, and also provide a pair
of streams StreamConnectionHandler for the plugin to write/read.
NewPacketFormat handles the list of message-in-flight. A new object
must be used for this purpose while NewPacketFormat performs lesser
tasks. Both NewPacketFormat and NewStreamFormat can communicate with
it.

Question: MessageWrapper tracks a message-in-flight. But is it really
necessary to create a base class for MessageWrapper and create
StreamMessageWrapper too. Or would it be simple to make necessary
modifications(if there are any) to MessageWrapper.
Please explain the purpose of doing so, as I have very little
understanding, as of now, of the object Message. Also how it will be
treated differently for streams against packets.

d. Another issue is regarding FNPPacketMangler. This is an important
aspect of freenet, as it deals with the handshake between two nodes,
and the exchange of cryptographic keys. So the issue being whether per
NodeCrypto we have an object or per transport we have an object, of
the FNPPacketMangler type. And assuming these are packet based
transports.

Question: How can the equivalent of FNPPacketMangler be created for
stream based connections. I don't think this was discussed at all or
in detail on the IRC. Some suggestions here would be helpful. My
knowledge is that the JFK protocol works for packet based transports,
specifically UDP. How would this function in case of streams?

e. Another thing that needs clarification is regarding who decides
when to send the packets. Since stenography is all about the timing
and the format of the packet, the plugin must have control. However
that would make some other transport plugins difficult to write. toad
suggested the following. To quote him- "PacketSender constantly loops
over peers to send packets to them. We'll probably have two separate
mechanisms for packet-based - one where we are just wrapping packets
with different headers, so the node decides when to send a packet, and
one where the plugin decides when to send a packet and demands data to
fill it from the node. The latter is "constant bitrate", or really
accurate fakery; it's a long term project, as is how to fill up the
packets when there's nothing to send." This sounds acceptable, however
when I get there I will discuss how this should be implemented. But I
believe that it will not affect the initial stages of the project.

Question: How does the same work for streams? Firstly the transport
must have its own flow control mechanism to decide when to send. Also
there must be a way to let the node know this. I am guessing
NewStreamFormat handle this? It must also create
StreamConnectionHandler for the plugin to read/write. Must also do
encryption using existing BlockCiphers? It must convert the encrypted
data into a stream? I suppose I can draw parallels to NewPacketFormat
and do it.

3) Plugins, streams, transports

I will need to create a base class for transports - TransportPlugin.
This is designed as per the developer's requirements. However the
major idea is that it would open sockets, and listen for connections.
For a packet-based plugin as mentioned it is called by PacketSender to
send data. If it wishes to for stenographic reasons, can send dummy
data by itself. Also it will handle all necessary parsing and encoding
for whichever protocol it is trying to mimic. It creates its own
threads to copy data from freenet and send it.
For a stream-based plugin, it runs its own loop of getting/writing
data from/to StreamConnectionHandler(node-side), encoding/decoding,
and sending/receiving to its socket. It must have its own flow control
mechanism.

To be discussed-

One major point I haven't discussed is how multiple transports work.
For e.g. a node might be able to communicate using several transports,
while its peer might not be able to do so. It had been the case that
for datagrams one needed a single port that sent messages to all its
clients. But with multiple transports, the node needs a record of
active transports for each peer. Apart from this we need to discuss
how the messages are distributed between transports. This also means
some transports might be slow, or the user prefers one of the
transports. Although I wish to address it within the timeline of GSoC,
I am not sure how it will turn out. But for the moment my idea is to
be able to choose the needed transport, although the framework to use
them simultaneously or switch from one to another will be supported.
If I find that the logic to implement selection of transports is easy,
then I can implement it. But I assume that needs some usage analysis
as well. Based on that we can comment.
My objective is to atleast get a functional freenet that will atleast
figure one way to connect to a peer, and this can be different for
different peers.
I need your opinions on this. But atleast some modification of
PeerNode to keep track of which transport works is a must.

This is a haphazard report, that has questions, issues as well as
conclusions. Based on feedback and suggestions, for the next two weeks
I wish to work on refactoring changes to support the above. Also
thanks to toad for making it very simple for me, and the fact that
over a month, all his design implementation ideas mentioned on email
and irc are consistent and complementary to each other.

I will work on a separate branch and I am not sure how it follows from
now on, as I submit code. The present idea is to create a branch for
every task, to be completed every week. Comments and suggestions are a
must!

Regards,
Chetan Hosmani
Steve Dougherty | 5 May 07:43
Favicon

Statistics Project Update #2


I've completed an initial run of simulation work on probes. The code is
available, [1] as well as the simulation results from which the plots
were generated. [2] The point of immediate interest though is the plots
themselves, [3] which show the predicted network coverage of different
probe routing techniques on networks with ideal degree distribution
(more on this later) and that following the degree distribution of
Freenet as measured. [4] Link lengths and locations do not factor into
this simulation because probes take only degree into account and are not
seeking any given destination; their goal is only to average out to
distribute endpoints uniformly throughout the network.

The ideal network distribution has each node add a fixed number of
remote connections without regard for the number of connections it or
the nodes it's connecting to have. I don't know whether this or having
each node have the same number of total connections is the ideal. The
results of the simulation did not appear to greatly change with
network size, as shown by the consistent behavior between the 12,000
and 45,000 node versions of the MH-corrected degree-conforming
simulation. [5]

As expected, the plots suggest that using Metropolis-Hastings correction
will be an immense improvement in endpoint uniformity over the current
uniform random routing, but specifically suggest that an HTL of around
20 hops is close enough to a baseline uniform endpoint probability to be
a good starting point. I've noticed that these CDFs aren't a very good
format for demonstrating closeness of distributions, given overlapping
lines, but I don't understand the Kolmogorov–Smirnov test yet, so I'm
planning to just use these results as a guideline and begin implementing
the new probes next week.

The gnuplot scripts to generate the degree and link length distribution
plots are part of pyProbe, [6] and GNU parallel [7] is used in test.sh
to run simulations in parallel. In the simulator source there are
scripts from an earlier effort to plot coverage as percentages, but that
was even less clear than the CDFs.

Comments and suggestions are very welcome!

Thanks,
operhiem1

[1] https://github.com/Thynix/routing-simulator/tree/dev
[2] http://asksteved.com/plot-source.tar.xz
[3] http://imgur.com/a/Z8SBS#2
[4] http://i.imgur.com/ehfBP.png
[5] http://i.imgur.com/rtRIB.png
[6] https://github.com/Thynix/pyProbe
[7] http://www.gnu.org/software/parallel/
Martin Nyhus | 1 May 20:11
Picon
Favicon

Freemail 0.1.1 and 0.2 released

After being in development for nearly a year Freemail 0.2 has been released.
The two main features in 0.2 is the new identity management which uses the Web
of Trust plugin, and a webmail client. This work was mostly done as part of
Google Summer of Code 2011. Due to the identity management changes this
version is incompatible with the earlier releases, but to ease the migration
the two versions can be used at the same time without any issues.

Version 0.1.1 fixes a number of bugs including one potential security issue
that could enable an attacker with access to the Freenet log files to fetch
emails from Freenet after they should have been inaccessible.

Both versions will be available through Freenet after the next update, and from
CHK <at> xXc1H2eh-1OtCoE4Z0-G4~5SfOFpTWa6YWOP~D4PyuA,dKRuAVWFlHd8ZNvFsIJj1Hzzuyoc7EfoVIXYgz-rfsg,AAIC--8/Freemail-0.1.1.jar
CHK <at> S0AnW~5CXyh3pLkzJHbRm5xj8kf26GyLcT3Zuf1UAsU,pt-TGV39s1ucWNTkZKMdo1dQyaxzaUsSjXlYtBAqfvc,AAIC--8/Freemail-0.2.jar

I am very interested in feedback about the reliability of Freemail, any bugs I
have missed and performance problems. This can be reported through the mailing
list, the bug tracker and on Freenet.

Detailed changelog for 0.1.1 (also included in 0.2):
  o Security fixes:
    - Log message fetch and insert keys at debug instead of normal/error. If a
      collision occurred the new slot would be logged at error, which
      would break the forward secrecy of the slot system until the log was
      deleted. This would enable an attacker with access to the log files to
      retrieve messages from Freenet.

  o Bugfixes:
    - Folders deleted using a mail client are now deleted properly
    - Fixes a crash that could occur if a mail client connected while Freemail
      was shutting down
    - The startup message now shows the correct licence (GPL)
    - Fixes a bug where certain email addresses would cause received messages to
      be empty
    - Fixes a race condition which could lead to Freemail hanging
    - Don't delete CC headers from a message before sending
    - Always print a log message when Freemail isn't connected to the node
    - IMAP: Remove extra space that was printed in a fetch response without a range
    - IMAP: Fix error message when the end of a range was invalid
    - IMAP: Handle strange sequence number ranges
    - IMAP: Remove \* from permanent flags since they were not stored
    - IMAP: Fix append with two or more flags
    - IMAP: Reply with error if the append length couldn't be parsed
    - Fix various locking issues
    - Don't log the recently failed fetch result as an error

  o Improvements:
    - Improve the explanations on the create account page
    - Only resend the RTS once per two days instead of once per message in the
      outbox per two days, reducing resource usage for unacked messages
    - Send messages in the order they will be received, improving performance
      when sending a large amount of messages
    - Alternate between sending and receiving, stopping sending/receiving a large
      number of messages from blocking other operations

  o Build improvements:
    - Compile for Java 1.6
    - Include git describe output in version
    - Enable warnings when building
    - Make Ant and Eclipse output files to the same location (build/)

  o Code changes:
    - Add unit tests for various classes (mostly IMAP)
    - Improve errors returned/thrown by HighLevelFCPClient
    - Add type parameters to all code
    - Add missing @Override annotations
    - Throw AssertionError in some cases that should be impossible
    - Use constants for config file keys
    - Respond to interrupts in the FCP code
_______________________________________________
Devl mailing list
Devl@...
https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
Pouyan Zaxar | 28 Apr 11:25
Favicon

Yet Another GSoC Greetings

Hi everyone!

I have been accepted for GSoC 2012 and I'm going to work on
reimplementation of FProxy using Apache Wicket. The main objective is to
separate structure (HTML) and design (CSS) of the web interface. Finally
it makes it possible for anyone even without prior Java knowledge to
write their own themes for Freenet.

Since a complete make-over is going to be done, this would also be a
good chance new features/functionalities to improve UI functionality:
suggestions more than welcome.

infinity0 is mentoring this project.

Cheerio
pausb
_______________________________________________
Devl mailing list
Devl@...
https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

Gmane