I2PSnarkXL

- mainpage
- faq
- blog

Faq

***

#### Index

- What is I2PSnarkXL?
- Where can i get I2PSnarkXL?
- Installing I2PSnarkXL
- Compiling I2PSnarkXL
- How can i make my own themes?
- What is a Keyword?
- Keyword-List
- What is a user keyword?
- Briefing of new clientspage
- Why should i use multiple bt-clients?
- Tips'n Tricks
- Howto Seed Swarm Service
*

#### What is I2PSnarkXL?

I2PSnarkXL is a 'fork' of I2PSnark[1] the most convenient BitTorrent client for I2P. Written in Java,
based on the "snark" client for ordinary Internet.
The development of I2PSnarkXL started at 28, jul 2008 and is still in process.
The primary purpose for the development is to enhance the user-friendliness and to built-in more
visible informations and stats and a managment that support this by own and external made user-templates.
I2PSnarkXL supports a multiple BT-Client enviroment just by copying and renaming the application file.
It supports multiple torrents under unlimited[2] local destinations.
At this time the most important step is done and the user-templates are integrated and working well.
The switching between the user-templates working in realtime. You can work on your own and external
themes while I2PSnarkXL is running and the effects of your work take place immediately on next refresh
interval.
[1] I2PSnark was ported to I2P by jrandom during autumn 2005. Since I2P version 0.6.1.8, snark is
integrated in the Router Console, and supports multiple torrents under one local destination.
info: complication.i2p
[2] limited by your system enviroment and resources
*

#### Where can i get I2PSnarkXL?

Currently on tracker2.postman.i2p uploaded by fwd.
*

#### Installing I2PSnarkXL

zip-structure:
in the i2p/webapps folder is the file "[renameMe].war"
rename it like you want for your installation and copy it to your "i2p/webapps" folder.
How to start the renamed war-file:
copy it to your "i2p/webapps" folder
restart i2p
client access:
http://127.0.0.1:7657/[renameMe]/
for the themes use:
http://127.0.0.1:7657/[renameMe]/?themes=jama
http://127.0.0.1:7657/[renameMe]/?themes=minimalist
...
in the link replace "[renameMe]" with the name of the war-file without ".war"
example:
rename "[renameMe].war" to "i2psnarkxl.war" then the link is
http://127.0.0.1:7657/i2psnarkxl/
for the themes use:
http://127.0.0.1:7657/i2psnarkxl/?themes=jama
http://127.0.0.1:7657/i2psnarkxl/?themes=minimalist
...
if you add the client with a new name to get a new multiple client then
you have to press once 'save configuration' after your first access to
http://127.0.0.1:7657/i2psnarkxl/
------------------------------------------------------------------------------
Folders for the html-templates:
if you wanna use the themes then I2PSnarkXL expects that the following templates-path exists
i2p/templates/i2psnarkxl/jama/*
i2p/templates/i2psnarkxl/minimalist/*
...
(copy the i2p/templates folder from the zip-archiv to your i2p directory. )
Folders for the resources (pictures, stylesheets, etc):
and the jetty-server expects for resources in i2p/docs/themes/
i2p/docs/themes/i2psnarkxl/jama/*
i2p/docs/themes/i2psnarkxl/minimalist/*
...
(copy the i2p/docs/themes/i2psnarkxl folder from the zip-archiv to your i2p/docs/themes/ directory. )
------------------------------------------------------------------------------
the folder "war-necessaries" is for those that like to compile the source by themselfs.
it contains the important web.xml for the war-file
the folder "src" contains the sourcecode
all is included in the zip-archiv!
*

#### Compiling I2PSnarkXL

INCOMPLETE
just some hints.
- add all jars ( except i2psnark.jar ) from the i2p/lib folder to your classpath setting ( or -cp option )
- compile the source
- copy all compiled class-files (*.classes) to war-necessaries/WEB-INF/classes/ (from the zip-archiv)
- watchout that you kept the folder structure (package-structure) of the classes
example:
the path for "Snark.class" is "WEB-INF/classes/org/klomp/snarkxl/Snark.class" and the path for
"I2PSnarkXLServlet.class" is "WEB-INF/classes/org/klomp/snarkxl/web/I2PSnarkXLServlet.class"
- zip the folders "META-INF" and "WEB-INF" together in one file name it with extention ".war"
the folders "META-INF" and "WEB-INF" are in the zip-archiv included, watchout that the "web.xml" from
the zip-archiv is included in the folder "WEB-INF"!
comment: jar-files and war-files are allway zips! (not rar!) this is very important!
INCOMPLETE
*

#### How can i make my own themes?

The easiest way is to copy and renaming the 'minimalist' folder in i2p/templates/i2psnarkxl/
same do with the folder in i2p/docs/themes/i2psnarkxl/
after renaming the folder your 'new theme' is done!
example:
The following doings need not a restarting of I2P or I2PSnarkXL!
You can do it while I2PSnarkXL is running.
1.)
copy and renaming the 'minimalist' folders to 'mytheme'
the path-structure for the templates is i2p/templates/i2psnarkxl/mytheme/
the path-structure for the jetty-server is i2p/docs/themes/i2psnarkxl/mytheme/
2.)
expecting you named the war-file of I2PSnarkXL as 'i2psnarkxl.war'
call your new theme with http://127.0.0.1:7657/i2psnarkxl/?themes=mytheme
3.)
open the templates i2p/templates/i2psnarkxl/mytheme/ with a editor and change the html-source.
save your changes and refresh your browser. your changing take place immediately .
----------------
some hints:
template_html.html is the first page that is called by I2PSnarkXL for using a theme.
if you want integrating some pictures in the templates than you have to prefix 'theme_resource/'
as path. I2PSnarkXL rewrite all spelling of 'theme_resource/' that is found in the templates to
/themes/i2psnarkxl/mytheme/
this is neccessary for the jetty-server because it expects the resources
of the page on address http://127.0.0.1:7657/themes/i2psnarkxl/mytheme/
i nice side effect of that is that you can create a folder named 'theme_resource' in your
template folder and put your pictures into that. so you can open the template with a browser
and take a look direct on it.
Don't forget to put your picture there too!
the picture with path
<img src="theme_resource/test.gif"> in one of the templates becomes to
<img src="themes/i2psnarkxl/mytheme/test.gif"> after access of I2PSnarkXL with the browser
the static uri for the jetty-server is: http://127.0.0.1:7657/themes/i2psnarkxl/mytheme/test.gif
A 'theme_resource/' folder in i2p/templates/i2psnarkxl/mytheme/ is not neccessary for the
function of I2PSnarkXL. It just makes your work more suitable. see: theme-folder 'jama'.
----------------------------------------------
Please do not insert Javascript on your own templates! That really could destroy your anonymity.
Once you got happits to use XL-templates with Javascript ... other -external- loaded templates could
force and tread you with hidden stuff.
*

#### How can i make my own themes II?

Since version i2psnarkxl-20090120a i made it more easily for you to make your own themes.
I moved all neccessaries of theme "expert" to the user config files.
The only thing that you have to do is to ...
1) copy the template folder of theme expert in "i2p/templates/i2psnarkxl" and rename
the copied folder.
after copy and renaming
2) open the user config files "user_lang_en.config" and "user_lang_de.config" in the new folder.
search for key "user_key_theme_name=expert" and rename "expert" to the same name
you had renamed your copied folder. save the files.
3) copy and rename the expert folder in "i2p/docs/themes/i2psnarkxl" to the same name
you choose before.
all dependencies are done when you have changed the user key "user_key_theme_name=" in the user configs.
I prepared the theme expert in that way that all dependencies are renamed automatically to that userkey.
try it out and change some colors in the stylesheets of "template_html.html" in the new folder.
" .totab" is the torrent table on the mainpage and
" .petab" is the table for the peers (when you toggle)
change the "background: #xxxxxx" values for them and save it. watch the effect after browser refresh.
any problems? ask me!
*

#### What is a Keyword?

Keywords are placeholders in the html-templates.
Keywords would be replaced by some content of the running app.
example:
When your client's war-file is named as "I2PSnarkXL.war" then
the line "This is {title} - a BT-Client for I2P." will be displayed as "This is I2PSnarkXL - a BT-Client for I2P."
*

#### Keyword-List

List of current known KEYWORDS.
General:
{title} - Placeholder for the current name of the war-file without ".war"
{link_ext_showpeers} - style: String with boolean-like function 'p=0' or 'p=1' (current state of showpeers)
{my_peer_id} - style: String ("CwsL@" + current connection id)
{charset} - style: String your current settings of the configuration file "default.config" of a theme or UTF-8
{versionXL} - style: String (current version of XL)
in "template_html.html":
{torrent_template} - Placeholder for the content of "template_torrent.html"
in "template_torrent.html":
{iterator_torrents_template} - Placeholder for the content of "iterator_torrents_template.html"
{torrents_total_ulrate} - style: intValue + 'Bps' or 'Kps' or 'Mps' or 'Gps'
{torrents_total_dlrate}; - style: intValue + 'Bps' or 'Kps' or 'Mps' or 'Gps'
{torrents_total_uploaded} - style: intValue + 'B' or 'KB' or 'MB' or 'GB'
{torrents_total_downloaded} - style: intValue + 'B' or 'KB' or 'MB' or 'GB'
in "template_torrent_peers.html":
{iterator_torrents_peer_template} - Placeholder for the content of "iterator_torrents_peer_template.html"
{peers_total_pieces_requested} - style: intValue
{peers_total_ulrate} - style: intValue + 'Bps' or 'Kps' or 'Mps' or 'Gps'
{peers_total_dlrate}; - style: intValue + 'Bps' or 'Kps' or 'Mps' or 'Gps'
{peers_total_ultotal} - style: intValue + 'B' or 'KB' or 'MB' or 'GB'
{peers_total_dltotal} - style: intValue + 'B' or 'KB' or 'MB' or 'GB'
{peers_total_pieces_available} - style: intValue
{peers_total_pieces_available_percent} - style: floatValue
{peers_total_progressbar_size} - style: intValue ({peers_total_pieces_available_percent} as integer value)
{peers_total_pieces_available_string} - text-based 'progressBar of available pieces' for the current peers
in "iterator_torrents_template.html":
{template_torrent_peers} - Placeholder for the content of "template_torrent_peers.html"
{torrent_name} - style: String
{torrent_status} - style: String 'Waiting'; 'Seeding'; 'Leeching'; 'Stopped'; 'None'
{torrent_piece_count} - style: intValue
{torrent_pieces_completed} - style: intValue
{torrent_percent} - style: floatValue
{torrent_progressbar_size} - style: intValue (same value like {torrent_percent} as integer value)
{torrent_dlsize} - style: intValue + 'B' or 'KB' or 'MB' or 'GB'
{torrent_size} - style: intValue + 'B' or 'KB' or 'MB' or 'GB'
{torrent_ulrate} - style: intValue + 'Bps' or 'Kps' or 'Mps' or 'Gps'
{torrent_dlrate} - style: intValue + 'Bps' or 'Kps' or 'Mps' or 'Gps'
{torrent_uploaded} - style: intValue + 'B' or 'KB' or 'MB' or 'GB'
{torrent_downloaded} - style: intValue + 'B' or 'KB' or 'MB' or 'GB'
{torrent_peer_count} - style: intValue
{torrent_known_peer_count} - style: intValue ( peers that are announced by the tracker(s) )
{torrent_InfoHash} - style: String
{torrent_InfoHash_urlencoded} - style: urlencoded String
{torrent_pieces_string} - text-based 'progressBar of available pieces' of the torrent
in "iterator_torrents_peer_template.html":
{peer_name} - style: String
{peer_userClient} - style: String I2PSnark; I2PRufus; I2P-BT; Azureus; XL; Unknown
{peer_pieces_requested} - style: intValue
{peer_piece_count} - style: intValue
{peer_progressbar} - style: image
{peer_percent} - style: floatValue
{peer_progressbar_size} - style: intValue (same value like {peer_percent} as integer value)
{peer_ulrate} - style: intValue + 'Bps' or 'Kps' or 'Mps' or 'Gps'
{peer_dlrate} - style: intValue + 'Bps' or 'Kps' or 'Mps' or 'Gps'
{peer_ultotal} - style: intValue + 'B' or 'KB' or 'MB' or 'GB'
{peer_dltotal} - style: intValue + 'B' or 'KB' or 'MB' or 'GB'
{peer_interesting} - style: boolean 'true' / 'false'
{peer_choked} - style: boolean 'true' / 'false'
{peer_pieces_string} - Placeholder for a text-based 'progressBar of pieces' for the current peer-client
{peer_hasbadratio} - style: boolean 'true' / 'false'
under construction and might change:
in "template_html_clients.html":
{clients_template} - Placeholder for the content of "template_clients.html"
in template_clients.html
{iterator_clients_template} - Placeholder for the content of "iterator_clients_template.html"
in iterator_clients_template.html
{template_client_info} - Placeholder for the content of "template_client_info.html"
{client_isbanned} - style: boolean
{client_name} - style: String
{client_id} - style: String
{client_dest} - style: String
{client_hasbadratio} - style: boolean
{client_soft} - style: String
{client_isconnected} - style: boolean
{client_choking} - style: boolean
{client_haspeer} - style: boolean
{client_reconnections} - style: int
{client_first_seen} - style: timeFormatedString
{client_last_seen} - style: timeFormatedString
{client_last_try} - style: timeFormatedString
{client_connected_since} - style: timeFormatedString
{client_connection_time} - style: timeFormatedString
{client_torrent_name} - style: String
{client_dlrate} - style: intValue + 'Bps' or 'Kps' or 'Mps' or 'Gps'
{client_ulrate} - style: intValue + 'Bps' or 'Kps' or 'Mps' or 'Gps'
{client_ultotal} - style: intValue + 'B' or 'KB' or 'MB' or 'GB'
{client_dltotal} - style: intValue + 'B' or 'KB' or 'MB' or 'GB'
{client_ultotal_session} - style: intValue + 'B' or 'KB' or 'MB' or 'GB'
{client_dltotal_session} - style: intValue + 'B' or 'KB' or 'MB' or 'GB'
{client_ultotal_from_others} - style: intValue + 'B' or 'KB' or 'MB' or 'GB'
{client_percent} - style: floatValue + %
in template_client_info.html
{client_id} - style: String
{client_dest} - style: String
...
Don't be upset of the lenght of some keywords. After the testphase i'll integrate for every
keyword a shorten, abstract version too. At the moment i need just a human readable style to
find a redline in my doings and not to lossing myself in abstract spellings.
{torrents_uploaded_total} and {torrents_downloaded_total} are deprecated!
and renamed as {torrents_total_uploaded} and {torrents_total_downloaded} to keep a redline on keywords.
{peer_total_progressbar_size} is deprecated and renamed
as {peers_total_progressbar_size}
*

#### What is a user keyword?

A user keyword is a KEYWORD that is defined by yourself (or other users) and is used in the
templates as placeholder for a user defined replacement.
A user keyword starts allways with "user_key_" and have to exists 2 times to use it.
1. in the users configuration file(s). Here you define the replacements by your own.
2. in the templates as placeholder (as many times you want).
in the user configuration file(s) it looks like this:
user_key_mykey=hello world!
in the templates you have to put the user keyword in { } without space.
it looks like this:
{user_key_mykey}
After you have done that you have to announce I2PSnarkXL that it should use your doings.
That you do in the file "default.config" that is located in the main directory of a theme.
Here you tell I2PSnarkXL which user configuration file it should use.
the line looks like this
key_UserConfig=user_my.config
To name your own configuration file(s) you have to watchout for 3 rules.
1. the name for a user configuration file have allways to start with user_
2. the name for a user configuration file have allways to end with .config
3. no free spaces is allowed in the name itself.
All others between user_ and .config is your imagination
You could define user keywords as many as you want.
You could have configuration files as many as you want.
hint:
if your language not matches with the given "charset=ISO-8859-1" in "template_html.html" ...
easy, make a user keyword by your own and replace it for each user-language-file that you made
with the correct "charset" for it!
*

#### Why should i use multiple bt-clients?

because you like to have one snark for
-seeding your own torrents
-seeding other torrents
-seeding rare torrents
-seeding very active torrents
-downloading
-etc...
suggestions by stereotype
*

#### briefing new clientspage

         B - Banned:               whether or not "we banned us" from this client

        RC - Re Connections:       the count of new re-connections with this client

         C - Connected:            whether or not we are connected

         P - Peer:                 whether or not we have a peer with this client

        FS - First Seen:           time left since we know about this client

        LS - Last Seen:            time left since last successful contact

       LCT - Last Connection Try:  time left since we try a connection to this client

        CS - Connected Since:      time left since we are etablished last successful
                                   connection with this client (current session)

        CT - Connected Time:       time we were truly connected with this client
                                   since FS

      up T - up Total:             the amount we upload to this client since FS

    down T - down Total:           the amount we download from this client since FS

      up S - up Session:           the amount we upload to this client since CS

    down S - down Session:         the amount we download from this client since CS

       UFO - Upload From Others:   the amount the client downloaded from other
                                   clients since FS

↓ and ↑ - descending sort orders
... incomplete
*

#### Tips'n Tricks

- changing the refresh rates for the example themes.
Howto:
open the 'template_html.html' of jama and minimalist.
search the line <meta http-equiv="refresh" content="90;"> (should be the 6th line in the header)
change content="90;" to content="60;" for a shorten refreshtime or content="120;" for a lower refreshtime.
the value is time in seconds for the refresh interval.
--------
- some of the keywords you can use to toggle images.
example:
to include a picture for 'choked' instead the 'true' or 'false' outprint you have to copy one picture to
the themes folder in i2p/docs/themes/i2psnarkxl/*themes_name*/
name the picture like you want, i use for this example the name choked_01.png. copy a second
picture there too. i use for this example as name for the second picture choked_02.png.
Now, for use them as a switcher for the KEYWORD {peer_choked} we have to rename them again.
rename choked_01.png as choked_true.png
rename choked_02.png as choked_false.png
to include them in the "iterator_torrents_peer_template.html" of a theme we have to write
<img src="theme_resource/choked_{peer_choked}.png"> as a replacement for the previous
written {peer_choked} in "iterator_torrents_peer_template.html".
That's it! Now if you've done all right. your theme should shown the pictures instead 'true' or 'false'.
--------
- things you should not do: **
* naming the xl-clients as "i2p.war"; "router.war"; "routerjvm.war" they all creating pid-files too.
* naming the xl-clients as "dummyxl.war" or "unset.war". That all are logical keywords in the app while
the clients name is currently not indentified at startup.
* using same torrent folders for different XL-Clients.
* renaming the folder for the torrents as "unset". thats even a keyword in the app while the clients
name is currently not indentified at startup too.
**(just in case that "Murphy" is somewhere around on i2p)
--------
while the progressBar for pieces are currently just a gimmick to show whats possible with XL and perform a
high CPU-usage on every browser refresh, you should remove the Keyword {peer_pieces_string} in
"iterator_torrents_peer_template.html" for it.
In common versions of XL the methodes for it get a better performance but currently not!
*

#### Why should i use I2PSnarkXL?

...
because after installing I2PSnarkXL the sun is shining more brightly on you and you will have great sex
with your girlfriend.
*
Work in process ... see you soon.
***