My Academic Licence Open Source Title – Jump API


Jump API (Academic + GPL3)

Jump API is an api that contain our own xcp checksum as well as a framework for shortening URL from long one to either subdomain or path based redirection from the generated shorten URL to the final URL that was shortened.

This project was our first licensed title for academic purposes partly cause it discusses all the primary functions within the LAMP environment and has easy to follow code and/for/from digressions for academic purposes.

GitHub.com Resources

The following URL is the location of this project on GitHub.com: https://github.com/Chronolabs-Cooperative/Jump-API-PHP; you will be able to join as well as contribute to this API through this resource!

Download the Source Code

A lot of our source-code is open and stored on sourceforge.net – you will find the api’s source code in it’s own private project here:- github.com/Chronolabs-Cooperative/ orsourceforge.net/projects/chronolabsapis!<$

Shortening URL Services Operate on the following URLs

The following URL can be used to Shortening a URL, they are the following domains with this API on it:-

Advertisements

Xalky – Chat like a cockatoo!! With Peer-to-peer signing + Triad AES Revolving Keys!!


I have been working on a XOOPS 2.5 Module called Xalky; it is a chat program that is like an IRC Chat that free floating with room-to-room peer signing between websites so groups of users can chat between the free floating mesh of room chat!

I am writing this article to explain the triad AES Key system I will be using in this program to secure the peer exchange with a something known with expiry and on-contact historical stab and guess key for with the AES Encryption Algorithm ( aes.php | aes.js.php )  .

I started this application from another frame work many months ago while I was still suffering like I am now from a programming injury, RSI Agony! I have decided to change the framework of the ‘look’ and it is in an animated Modal that popup’s from the bottom of the screen.

The Code Stamp For this project is as follows:-

/**
 * Xalky - Code Stamp Example - cipher.labs.coop - XOOPS Chat Rooms
 *
 * You may not change or alter any portion of this comment or credits
 * of supporting developers from this source code or any supporting source code
 * which is considered copyrighted (c) material of the original comment or credit authors.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * @copyright   Chronolabs Cooperative http://sourceforge.net/projects/chronolabs/
 * @license     GNU GPL 3 (http://labs.coop/briefs/legal/general-public-licence/13,3.html)
 * @author      Simon Antony Roberts <wishcraft@users.sourceforge.net>
 * @see		http://sourceforge.net/projects/xoops/
 * @see		http://sourceforge.net/projects/chronolabs/
 * @see		http://sourceforge.net/projects/chronolabsapi/
 * @see		http://labs.coop
 * @version     1.0.5
 * @since	1.0.1
 */

Revolving Key One – 128 Byte Blowfish Salt

The first aes blowfish salt ( aes.php | aes.js.php )   is the peer-to-peer signing, these expire + will do peer dial-back to resign around the expiry date to rewrite in both peering recording, for a key that is static for a period of time up to a random expiry time-stamp in the future.

There is 2 records for this one in the source website in the peer exchange and the remote peer exchange paralleled the database, this is between a source peer and a remote peer.

This all happens in the `xalky_blowfishing` table; and is done through the callback records in the `xalky_peers` table.

TABLE `xalky_blowfishing`

xalky/sql/mysql.sql

CREATE TABLE `xalky_blowfishing` (
  `salt-id` varchar(32) NOT NULL,
  `source-peer-id` varchar(32) NOT NULL DEFAULT '',
  `remote-peer-id` varchar(32) NOT NULL DEFAULT '',
  `source-salt` varchar(128) NOT NULL DEFAULT '',
  `remote-salt` varchar(128) NOT NULL DEFAULT '',
  `created` int(12) NOT NULL DEFAULT '0',
  `updated` int(12) NOT NULL DEFAULT '0',
  `expires` int(12) NOT NULL DEFAULT '0',
  `date-zone` varchar(64) NOT NULL DEFAULT 'Australia/Sydney',
  PRIMARY KEY (`salt-id`,`source-peer-id`,`remote-peer-id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Revolving Key Two – 128 Byte Blowfish Salt

The secondary aes blowfish salt ( aes.php | aes.js.php )   is the peering signing, these expire + will do peer dial-back to resign around the expiry date to rewrite in both peering recording, for a key that is static from the initial signing between room local and room remote to connect them with the /peer command we are going to build into the room control.

The only time these keys would rewrite is when the seeding changes; this is when you have the most local users, the channel program will elect you as the seeder. This is for load balancing!!

This happens with these 4 fields in the table below:-

  `local-aes` enum('yes','no') NOT NULL DEFAULT 'yes',
  `local-aes-salt` varchar(128) NOT NULL DEFAULT '',
  `remote-aes` enum('yes','no') NOT NULL DEFAULT 'yes',
  `remote-aes-salt` varchar(128) NOT NULL DEFAULT '',

There is 2 records for this one in the source website in the peer exchange and the remote peer exchange paralleled the database, this is between a source peer and a remote peer.

The four fields will update in the paralleled when the seeder changed this four fields – are peer group set based on the number of local users you have in the shared room-to-room; which remember other people could have multiple rooms peered on theirs which in one share with you they can have all that room in your room operating, private messaging direct etc.

When the following four fields change, it elects a need seeder in the group peering share relay (That is the four fields illustrated above get renegotiated:-

  `seeder-peer-id` varchar(32) NOT NULL DEFAULT '',
  `seeder-name` varchar(250) NOT NULL DEFAULT '',
  `seeder-uri` varchar(250) NOT NULL DEFAULT '',
  ...
  `room-seeder` enum('yes','no') NOT NULL DEFAULT 'no',

This all happens in the `xalky_peering` table; and is done through the callback records in the `xalky_peers` table.

TABLE `xalky_peering`

xalky/sql/mysql.sql

CREATE TABLE `xalky_peering` (
  `peering-id` varchar(32) NOT NULL,
  `local-room-id` varchar(32) NOT NULL DEFAULT '',
  `remote-room-id` varchar(32) NOT NULL DEFAULT '',
  `drop-link-pass` varchar(32) NOT NULL DEFAULT '',
  `local-owner-user-id` varchar(32) NOT NULL DEFAULT '',
  `remote-owner-user-id` varchar(32) NOT NULL DEFAULT '',
  `callback-peer-id` varchar(32) NOT NULL DEFAULT '',
  `callback-name` varchar(250) NOT NULL DEFAULT '',
  `callback-uri` varchar(250) NOT NULL DEFAULT '',
  `seeder-peer-id` varchar(32) NOT NULL DEFAULT '',
  `seeder-name` varchar(250) NOT NULL DEFAULT '',
  `seeder-uri` varchar(250) NOT NULL DEFAULT '',
  `local-users` bigint(20) unsigned NOT NULL DEFAULT '0',
  `remote-users` bigint(20) unsigned NOT NULL DEFAULT '0',
  `send-messages` bigint(20) unsigned NOT NULL DEFAULT '0',
  `recieved-messages` bigint(20) unsigned NOT NULL DEFAULT '0',
  `local-aes` enum('yes','no') NOT NULL DEFAULT 'yes',
  `local-aes-salt` varchar(128) NOT NULL DEFAULT '',
  `remote-aes` enum('yes','no') NOT NULL DEFAULT 'yes',
  `remote-aes-salt` varchar(128) NOT NULL DEFAULT '',
  `room-seeder` enum('yes','no') NOT NULL DEFAULT 'no',
  `room-save` enum('yes','no') NOT NULL DEFAULT 'yes',
  `remote-ping` float(22,16) NOT NULL DEFAULT '0.0000000000000000',
  `remote-down` enum('yes','no') NOT NULL DEFAULT 'yes',
  `started` int(12) NOT NULL,
  `last-message` int(12) NOT NULL,
  `last-ping` int(12) NOT NULL,
  `delay-ping` int(12) NOT NULL,
  `finished` int(12) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`peering-id`,`local-room-id`,`remote-room-id`,`remote-down`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Revolving Key Three – 128 Byte Header Salt

The secondary aes header salt ( aes.php | aes.js.php )   is the peering signing, these expire + but do no reassignment around the expiry which is the memory of the remote peering PHP Session with cURL Cookie set; see with this key it is passed to the source of the key from the header in a sequence of one of the one exchange in the last few hours; so the AES Cipher can try to unlock several packages based on the source data md5 checksum value decrypted which is passed in the header IP Packets.

The following headers are set with header() for cURL to discovery of on your site running xalky and XOOPS within xalky/preloads/core.php:-

xalky/preloads/core.php

// Sets Contextual Headers with Encryption Blowfish Keys for Discovery method
header('Xalky-URL-Site: '. XOOPS_URL);
header('Xalky-URL-Chat: '. XOOPS_URL . '/modules/xalky/');
header('Xalky-API-Callback: '. XOOPS_URL . '/modules/xalky/%s/callback.api');
header('Xalky-API-Data: '. XOOPS_URL . '/modules/xalky/data/callback.api');
header('Xalky-API-Profile: '. XOOPS_URL . '/modules/xalky/profile/callback.api');
header('Xalky-AES-Support: Yes');
header('Xalky-Peer-Sitename: '.$GLOBALS['xoopsConfig']['sitename']);
header('Xalky-Peer-Slogan: '.$GLOBALS['xoopsConfig']['slogan']);
header('Xalky-Peer-Email: '.$GLOBALS['xoopsConfig']['admin_email']);
header('Xalky-Peer-ID: '.($GLOBALS['xalkyPeerID'] = self::getPeerID()));
if (!is_array($_SESSION['xalkyOldIssuedSalt']))
	$_SESSION['xalkyOldIssuedSalt'] = array();
if (isset($_SESSION['xalkyIssuedSalt']))
	$_SESSION['xalkyOldIssuedSalt'][microtime(true)] = $_SESSION['xalkyIssuedSalt'];
header('Xalky-AES-Salt: '. ($_SESSION['xalkyIssuedSalt'] = $GLOBALS['xalkyIssuedSalt'] = self::getSalt(0,127,'')));

This key is to be used on exchange with a php session history with the caller; so in the last hour or so; when it is passed a AES Crypted ( aes.php | aes.js.php )  package this is used one of the Xalky-AES-Salt is used with sending to it source from the history of the last hour or so of contacts with the calling peer, or caller peer and is sent in all cURL Calls as a Header this sequence!~

Final Database Design for Torrent Tracker!!


The following Database is what I have decided will be my final for my first release in a week or two of the torrent tracker; the following SQL is the design of the torrent trackers database, which is:-

CREATE TABLE `agents` (
 `id` varchar(32) NOT NULL,
 `agent` tinytext NOT NULL,
 `created` int(12) NOT NULL DEFAULT '0',
 `instances` int(8) NOT NULL,
 PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `apis` (
 `id` varchar(32) NOT NULL,
 `api-url` varchar(200) NOT NULL,
 `polinating` enum('Yes','No') NOT NULL DEFAULT 'Yes',
 `major` tinyint(4) NOT NULL DEFAULT '1',
 `minor` tinyint(4) NOT NULL DEFAULT '0',
 `revision` tinyint(4) NOT NULL DEFAULT '1',
 `callback` varchar(200) NOT NULL,
 `secret` tinytext NOT NULL,
 `agentid` varchar(32) NOT NULL DEFAULT '',
 `calls-recieved` mediumint(24) NOT NULL DEFAULT '0',
 `calls-sent` mediumint(24) NOT NULL DEFAULT '0',
 `kbytes-recieved` mediumint(24) NOT NULL DEFAULT '0',
 `kbytes-sent` mediumint(24) NOT NULL DEFAULT '0',
 `torrents-recieved` mediumint(24) NOT NULL DEFAULT '0',
 `torrents-sent` mediumint(24) NOT NULL DEFAULT '0',
 `peers-recieved` mediumint(24) NOT NULL DEFAULT '0',
 `peers-sent` mediumint(24) NOT NULL DEFAULT '0',
 `questions` mediumint(24) NOT NULL DEFAULT '0',
 `failures` mediumint(24) NOT NULL DEFAULT '0',
 `heard` int(12) NOT NULL DEFAULT '0',
 `down` int(12) NOT NULL DEFAULT '0',
 `failed` int(12) NOT NULL DEFAULT '0',
 `created` int(12) NOT NULL DEFAULT '0',
 PRIMARY KEY (`id`,`api-url`,`polinating`,`callback`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `apis_to_pings` (
 `source-apiid` varchar(32) NOT NULL,
 `target-apiid` varchar(32) NOT NULL,
 `time-zone` varchar(100) NOT NULL,
 `recieved` float(24,14) NOT NULL DEFAULT '0.00000000000000',
 `sent` float(24,14) NOT NULL DEFAULT '0.00000000000000',
 `delay` float(24,14) NOT NULL DEFAULT '0.00000000000000',
 `average` float(24,14) NOT NULL DEFAULT '0.00000000000000',
 `test` tinyint(4) NOT NULL,
 `tests` tinyint(4) NOT NULL,
 `year` tinyint(4) NOT NULL,
 `month` tinyint(2) NOT NULL,
 `day` tinyint(2) NOT NULL,
 `hour` tinyint(2) NOT NULL,
 `minute` tinyint(2) NOT NULL,
 `second` tinyint(2) NOT NULL,
 `stamp` float(24,14) NOT NULL DEFAULT '0.00000000000000',
 `delete` int(12) NOT NULL DEFAULT '0',
 PRIMARY KEY (`source-apiid`,`target-apiid`,`test`,`tests`,`month`,`year`,`day`,`hour`,`minute`,`second`,`time-zone`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `callbacks` (
 `when` int(12) NOT NULL,
 `uri` varchar(250) NOT NULL DEFAULT '',
 `timeout` int(4) NOT NULL DEFAULT '0',
 `connection` int(4) NOT NULL DEFAULT '0',
 `data` mediumtext NOT NULL,
 `queries` mediumtext NOT NULL,
 `fails` int(3) NOT NULL DEFAULT '0',
 PRIMARY KEY (`when`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `files` (
 `id` bigint(40) unsigned NOT NULL,
 `path` varchar(255) NOT NULL DEFAULT '',
 `filename` varchar(255) NOT NULL,
 `size` bigint(20) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (`id`),
 KEY `torrentid` (`path`),
 KEY `filename` (`filename`(100)),
 KEY `EXIST` (`path`,`filename`,`size`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `files_to_torrents` (
 `id` bigint(60) unsigned zerofill NOT NULL,
 `fileid` bigint(40) unsigned NOT NULL,
 `torrentid` bigint(30) unsigned zerofill NOT NULL,
 `seeders` int(10) unsigned NOT NULL,
 `leechers` int(10) unsigned NOT NULL,
 `completed` int(10) unsigned NOT NULL,
 `lastchecked` int(12) unsigned NOT NULL,
 PRIMARY KEY (`id`),
 KEY `common` (`fileid`,`torrentid`,`lastchecked`),
 KEY `EXISTS` (`fileid`,`torrentid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `networking` (
 `id` varchar(32) NOT NULL DEFAULT '',
 `type` enum('ipv4','ipv6') NOT NULL DEFAULT 'ipv4',
 `ipaddy` varchar(64) NOT NULL DEFAULT '',
 `netbios` varchar(198) NOT NULL DEFAULT '',
 `domain` varchar(128) NOT NULL DEFAULT '',
 `country` varchar(3) NOT NULL DEFAULT '',
 `region` varchar(128) NOT NULL DEFAULT '',
 `city` varchar(128) NOT NULL DEFAULT '',
 `postcode` varchar(15) NOT NULL DEFAULT '',
 `timezone` varchar(10) NOT NULL DEFAULT '',
 `longitude` float(12,8) NOT NULL DEFAULT '0.00000000',
 `latitude` float(12,8) NOT NULL DEFAULT '0.00000000',
 `left` bigint(20) NOT NULL DEFAULT '0',
 `downloads` bigint(20) NOT NULL DEFAULT '0',
 `uploads` bigint(20) NOT NULL DEFAULT '0',
 `owned` int(10) NOT NULL DEFAULT '0',
 `torrents` int(10) NOT NULL DEFAULT '0',
 `created` int(13) NOT NULL DEFAULT '0',
 `last` int(13) NOT NULL DEFAULT '0',
 `whoisids` tinytext,
 PRIMARY KEY (`id`,`type`,`ipaddy`(15)),
 KEY `SEARCH` (`type`,`ipaddy`(15),`netbios`(12),`domain`(12),`country`(2),`city`(12),`region`(12),`postcode`(6),`longitude`,`latitude`,`created`,`last`,`timezone`(6)),
 KEY `EXISTS` (`type`,`ipaddy`,`netbios`,`domain`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `networking_to_agents` (
 `netagentid` varchar(32) NOT NULL,
 `ipid` varchar(32) NOT NULL DEFAULT '',
 `apiid` varchar(32) NOT NULL DEFAULT '',
 `trackerid` int(10) NOT NULL DEFAULT '0',
 `torrentid` bigint(30) unsigned zerofill NOT NULL DEFAULT '000000000000000000000000000000',
 `agentid` int(10) NOT NULL DEFAULT '0',
 `start` int(12) NOT NULL DEFAULT '0',
 `last` int(12) NOT NULL DEFAULT '0',
 `left` bigint(20) NOT NULL DEFAULT '0',
 `uploaded` bigint(20) NOT NULL DEFAULT '0',
 `downloaded` bigint(20) NOT NULL DEFAULT '0',
 `hits` bigint(20) NOT NULL DEFAULT '0',
 PRIMARY KEY (`netagentid`),
 KEY `EXISTS` (`ipid`,`apiid`,`trackerid`,`torrentid`,`agentid`) USING BTREE KEY_BLOCK_SIZE=128
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `networking_to_peers` (
 `netpeerid` varchar(32) NOT NULL,
 `ipid` varchar(32) NOT NULL DEFAULT '',
 `apiid` varchar(32) NOT NULL DEFAULT '',
 `trackerid` int(10) NOT NULL DEFAULT '0',
 `torrentid` bigint(30) unsigned zerofill NOT NULL DEFAULT '000000000000000000000000000000',
 `peerhash` varchar(44) NOT NULL DEFAULT '',
 `start` int(12) NOT NULL DEFAULT '0',
 `last` int(12) NOT NULL DEFAULT '0',
 `left` bigint(20) NOT NULL DEFAULT '0',
 `uploaded` bigint(20) NOT NULL DEFAULT '0',
 `downloaded` bigint(20) NOT NULL DEFAULT '0',
 `hits` bigint(20) NOT NULL DEFAULT '0',
 PRIMARY KEY (`netpeerid`),
 KEY `EXISTS` (`ipid`,`apiid`,`trackerid`,`torrentid`,`peerid`) USING BTREE KEY_BLOCK_SIZE=128
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `networking_to_torrents` (
 `ipid` varchar(32) NOT NULL,
 `torrentid` bigint(30) unsigned zerofill NOT NULL DEFAULT '000000000000000000000000000000',
 `started` int(13) NOT NULL DEFAULT '0',
 `last` int(13) NOT NULL DEFAULT '0',
 `finished` int(13) NOT NULL DEFAULT '0',
 `left` bigint(20) NOT NULL DEFAULT '0',
 `uploaded` bigint(20) NOT NULL DEFAULT '0',
 `downloaded` bigint(20) NOT NULL DEFAULT '0',
 PRIMARY KEY (`ipid`,`torrentid`),
 KEY `EXISTS` (`torrentid`,`ipid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `networking_to_whois` (
 `netwhoisid` varchar(32) NOT NULL,
 `ipid` varchar(32) NOT NULL DEFAULT '',
 `apiid` varchar(32) NOT NULL DEFAULT '',
 `trackerid` int(10) NOT NULL DEFAULT '0',
 `torrentid` bigint(30) unsigned zerofill NOT NULL DEFAULT '000000000000000000000000000000',
 `whoisid` varchar(32) NOT NULL DEFAULT '',
 `start` int(12) NOT NULL DEFAULT '0',
 `last` int(12) NOT NULL DEFAULT '0',
 `left` bigint(20) NOT NULL DEFAULT '0',
 `uploaded` bigint(20) NOT NULL DEFAULT '0',
 `downloaded` bigint(20) NOT NULL DEFAULT '0',
 `hits` bigint(20) NOT NULL DEFAULT '0',
 PRIMARY KEY (`netwhoisid`),
 KEY `EXISTS` (`ipid`,`apiid`,`trackerid`,`torrentid`,`whoisid`) USING BTREE KEY_BLOCK_SIZE=128
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `peers` (
 `id` bigint(60) unsigned zerofill NOT NULL,
 `torrentid` bigint(30) unsigned zerofill NOT NULL DEFAULT '000000000000000000000000000000',
 `trackerid` int(10) unsigned zerofill NOT NULL DEFAULT '0000000000',
 `apiid` varchar(32) NOT NULL DEFAULT '',
 `ipid` varchar(32) NOT NULL DEFAULT '',
 `peerhash` varchar(44) NOT NULL DEFAULT '',
 `peerid` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
 `port` smallint(5) unsigned NOT NULL DEFAULT '0',
 `uploaded` bigint(20) unsigned NOT NULL DEFAULT '0',
 `downloaded` bigint(20) unsigned NOT NULL DEFAULT '0',
 `left` bigint(20) unsigned NOT NULL DEFAULT '0',
 `numwant` bigint(20) unsigned NOT NULL DEFAULT '0',
 `key` varchar(20) NOT NULL DEFAULT '',
 `compact` enum('yes','no') NOT NULL DEFAULT 'yes',
 `supportcrypto` enum('yes','no') NOT NULL DEFAULT 'yes',
 `event` varchar(30) NOT NULL DEFAULT '',
 `seeder` enum('yes','no') NOT NULL DEFAULT 'no',
 `started` int(11) NOT NULL,
 `lastaction` int(11) NOT NULL,
 `connectable` enum('yes','no') NOT NULL DEFAULT 'yes',
 `agent` varchar(60) NOT NULL,
 `finished` int(10) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (`id`),
 UNIQUE KEY `torrent_peer_id` (`torrentid`,`peerid`),
 KEY `torrent` (`torrentid`),
 KEY `torrent_seeder` (`torrentid`,`seeder`),
 KEY `last_action` (`lastaction`),
 KEY `connectable` (`connectable`),
 KEY `torrent_connect` (`torrentid`,`connectable`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `peers_history` (
 `id` bigint(60) unsigned zerofill NOT NULL,
 `torrentid` bigint(30) unsigned zerofill NOT NULL DEFAULT '000000000000000000000000000000',
 `trackerid` int(10) unsigned zerofill NOT NULL DEFAULT '0000000000',
 `apiid` varchar(32) NOT NULL DEFAULT '',
 `ipid` varchar(32) NOT NULL DEFAULT '',
 `agentid` varchar(32) NOT NULL DEFAULT '',
 `peerhash` varchar(44) NOT NULL DEFAULT '',
 `peerid` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
 `started` int(11) NOT NULL,
 `lastaction` int(11) NOT NULL,
 `finished` int(10) unsigned NOT NULL DEFAULT '0',
 `deleted` int(12) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (`id`),
 UNIQUE KEY `torrent_peer_id` (`torrentid`,`peerid`),
 KEY `torrent` (`torrentid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `peers_history_events` (
 `id` bigint(60) unsigned zerofill NOT NULL,
 `historyid` bigint(60) unsigned zerofill NOT NULL DEFAULT '000000000000000000000000000000',
 `event` varchar(30) NOT NULL DEFAULT '',
 `uploaded` bigint(20) unsigned NOT NULL DEFAULT '0',
 `downloaded` bigint(20) unsigned NOT NULL DEFAULT '0',
 `left` bigint(20) unsigned NOT NULL DEFAULT '0',
 `numwant` bigint(20) unsigned NOT NULL DEFAULT '0',
 `compact` enum('yes','no') NOT NULL DEFAULT 'yes',
 `supportcrypto` enum('yes','no') NOT NULL DEFAULT 'yes',
 `seeder` enum('yes','no') NOT NULL DEFAULT 'no',
 `connectable` enum('yes','no') NOT NULL DEFAULT 'yes',
 `created` int(12) unsigned NOT NULL DEFAULT '0',
 `deleted` int(12) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (`id`),
 UNIQUE KEY `torrent_peer_id` (`id`,`historyid`),
 KEY `event` (`event`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `torrents` (
 `id` bigint(30) unsigned zerofill NOT NULL,
 `info_hash` varchar(40) NOT NULL,
 `info_bin` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,  `name` varchar(300) NOT NULL,
 `size` bigint(20) unsigned NOT NULL DEFAULT '0',
 `added` int(11) NOT NULL DEFAULT '0',
 `type` enum('single','multi') NOT NULL DEFAULT 'single',
 `numfiles` int(10) unsigned NOT NULL DEFAULT '0',
 `hits` int(10) unsigned NOT NULL DEFAULT '0',
 `times_completed` int(10) unsigned NOT NULL DEFAULT '0',
 `leechers` int(10) unsigned NOT NULL DEFAULT '0',
 `seeders` int(10) unsigned NOT NULL DEFAULT '0',
 `trackers` int(10) unsigned NOT NULL DEFAULT '0',
 `last_action` int(11) NOT NULL DEFAULT '0',
 `visible` enum('yes','no') NOT NULL DEFAULT 'yes',
 `banned` enum('yes','no') NOT NULL DEFAULT 'no',
 `owner_ipid` varchar(32) NOT NULL DEFAULT '',
 `activity` int(12) NOT NULL DEFAULT '0',
 PRIMARY KEY (`id`),
 UNIQUE KEY `info_hash` (`info_hash`),
 KEY `owner` (`owner_ipid`(10)),
 KEY `visible` (`visible`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `trackers` (
 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `added` int(11) NOT NULL DEFAULT '0',
 `tracker` varchar(500) NOT NULL DEFAULT '',
 `method` enum('curl','sockets','unknown') NOT NULL DEFAULT 'curl',
 `offline` enum('Yes','No') NOT NULL DEFAULT 'No',
 `protcol` enum('http://','https://','udp://') NOT NULL DEFAULT 'http://',
 `port` int(8) NOT NULL DEFAULT '80',
 `base` varchar(150) NOT NULL DEFAULT '',
 `domain` varchar(250) NOT NULL DEFAULT '',
 `path` varchar(150) NOT NULL DEFAULT '/announce',
 `whoisid` varchar(32) NOT NULL DEFAULT '',
 PRIMARY KEY (`id`),
 KEY `added` (`added`,`tracker`(25))
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE `trackers_to_polling` (
 `id` bigint(60) unsigned zerofill NOT NULL,
 `trackerid` int(10) unsigned NOT NULL,
 `torrentid` bigint(30) unsigned zerofill NOT NULL,
 `when` int(10) unsigned NOT NULL,
 `seeders` int(10) unsigned NOT NULL,
 `leechers` int(10) unsigned NOT NULL,
 `completed` int(10) unsigned NOT NULL,
 `lastchecked` int(12) unsigned NOT NULL,
 `activity` int(12) unsigned NOT NULL,
 `verify` int(12) unsigned NOT NULL,
 `failed` int(12) unsigned NOT NULL,
 PRIMARY KEY (`id`),
 KEY `common` (`trackerid`,`torrentid`,`lastchecked`),
 KEY `EXISTS` (`trackerid`,`torrentid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `trackers_to_torrents` (
 `id` bigint(60) unsigned zerofill NOT NULL,
 `trackerid` int(10) unsigned NOT NULL,
 `torrentid` bigint(30) unsigned zerofill NOT NULL,
 `seeders` int(10) unsigned NOT NULL,
 `leechers` int(10) unsigned NOT NULL,
 `completed` int(10) unsigned NOT NULL,
 `lastchecked` int(12) unsigned NOT NULL,
 PRIMARY KEY (`id`),
 KEY `common` (`trackerid`,`torrentid`,`lastchecked`),
 KEY `EXISTS` (`trackerid`,`torrentid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `tracker_to_pings` (
 `apiid` varchar(32) NOT NULL,
 `trackerid` int(10) NOT NULL,
 `time-zone` varchar(100) NOT NULL,
 `started` float(24,14) NOT NULL DEFAULT '0.00000000000000',
 `finish` float(24,14) NOT NULL DEFAULT '0.00000000000000',
 `delay` float(24,14) NOT NULL DEFAULT '0.00000000000000',
 `average` float(24,14) NOT NULL DEFAULT '0.00000000000000',
 `test` tinyint(4) NOT NULL,
 `bytes` int(10) NOT NULL,
 `year` tinyint(4) NOT NULL,
 `month` tinyint(2) NOT NULL,
 `day` tinyint(2) NOT NULL,
 `hour` tinyint(2) NOT NULL,
 `minute` tinyint(2) NOT NULL,
 `second` tinyint(2) NOT NULL,
 `stamp` float(24,14) NOT NULL DEFAULT '0.00000000000000',
 `delete` int(12) NOT NULL DEFAULT '0',
 PRIMARY KEY (`apiid`,`trackerid`,`test`,`month`,`year`,`day`,`hour`,`minute`,`second`,`time-zone`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `whois` (
 `id` varchar(32) NOT NULL,
 `whois` mediumtext NOT NULL,
 `emails` tinytext NOT NULL,
 `created` int(12) NOT NULL DEFAULT '0',
 `instances` int(8) NOT NULL,
 PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Subsonic At http://media.labs.coop:3666 — guest/guest


subsonic_logo

Hi how are you? I thought I would write to you today and invite you to upload some music to http://media.labs.coop:3666 such as mixes and audio works, there is a couple of method’s you can do this all the Username’s are guest and the Passwords are also guest

I have built and upload stagier when I file hasn’t changed md5 for 1800 seconds it is copied into the master directory where your directory order is kept for further submission or other organisation of files.

FTP Method:-

You will need an ftp client and all you need to do is use the URL of ftp://disk.media.labs.coop with the username of guest and the password ofguest; this will mount your uploaded files by the next day, this has a 3 Tb hard drive for us all to share!

Web-disk Method:-

You will need an webdav/webdisk client and all you need to do is use the URL of http://audio.disk.media.labs.coop for Audio and http://video.disk.media.labs.coop for Video with the username of guest and the password of guest; this will mount your uploaded files by the next day, this has a 3 Tb hard drive for us all to share!

Subsonic has an Android as well as iPhone application you can use, all you need to do is point it at http://media.labs.coop:3666 with the username of guest and the password of guest and you will be able to stream on the go from the libraries..

Please upload some music, I am looking for punk as well as alternative and other tracks as well like re-mixes and trance, as I had to format over my collection of these,

Be the Best you are;

Font API Version 2.1.9 — Release Archives/Packs


Font API Version 2.1.9

Release Archives/Packs

Here at Chronolabs Cooperative (wishcraft) we have been working on a new version 2.x of the Font’s API which is in release of version 2.1.x. This is without the unison cloud peering system, which will be additional in version 2.2.x coming out in a month or two.

The new font API you can see operating at http://fonts.labs.coop which is a complete Debian/Ubuntu solution. To Install there is quite a bit of configuration and you will have to be able to read the code as well as: apt-get install fontforge zip unzip bzip 7zip rar — and so on with the systems required to be installed as well as in some of the cronjobs you will require user permissions to be set with chown and chmod calls.

You can download the font API version 2.1.9 from sourceforge here: https://sourceforge.net/projects/chronolabsapis/files/fonts.labs.coop/Version%202.x/2.1.9/

In version 2.2.x we will be including a peer-to-peer cloud font sharing system without reproduction, as well as glyph output previews and be rounding of any callback and other options involved in the peer-2-peer font cloud sharing solution with a peering identify checksum!

This is the final revision for minor revision of 2.1!

Making a Callback API Cache Correctly for Bigger Systems


Making a callback cache for doing API callbacks is quite straight forward, if you where doing for this say a telecommunication company that had to notify many nearly there whole assumed customer base of functions happening on a phone say when an SMS was received by the network, then another call back for when the SMS or MMS was received on the device then this combined with call and duration and all the other stuff most people don’t get to use cause of limitation in the devices we use then this is how you make a workable callback cache.

See most people believe as a programmer that a call back is done at the point of contact for the notification this is not the cache, what it would do at this point is make a checksum cache file say fkjdsf8h934yt89h48h834h3.json for that call back; in a path structure like so ie. /function/callback-base-domain/callback-subdomains/client-username/kjdsf8h934yt89h48h834h3.json

You would then have a function which scoops say 200 of these every 4 minutes, as the curl timeout could be and best set for upto 360 seconds in response and connection timeout; if it fails say 7 times in the path of /function/callback-base-domain/callback-subdomains/client-username/ and you have a little json file in there that tracks the call fail and success rate, then you make another json file which the scoop search for like sandboxed.json and this just contains the timeout when it is unsandboxed and if the scoop finding this just drops the sandbox, if it say get sandboxed over 7 days you make that call back offline for near complete fail rates; otherwise 3/4 days in you send a warning notice.

See these systems are only maintained by programmers and generally ones of a resounding caliber or they will be websites where you put in your username and api key for the REST API. You need to make a system also for these website where someone can with either a TXT or temporary cname for a lookup to versify or even simple html or file verification, where they can put a callback when they are offering 3rd party services from your API which does happen where they get basic user information, like has credit (true/false) disconnect just as a few true false and the username without any API Key information, they can use this when they have it to query lesser sensitive information.

This sort of callback on the API is easily manageable you can have say 50 calls to the php with crontab with variables to specify on the cURL header information how many and what they do which all vary from every 1 minute to ever 9 minutes called with different quantities and thresholds; you would be able to make it also start up with a session handler more crons as they are required just by using the callback api file cache size in the writing and unlinking of these files which are not required to be stored after their system they are only a system typal of the moment, you have all that in the database anyway.

As long as you report the timezone and the time of the action, it is okey if you present the callback in delay of the function on the network; this is how any honed programmer would assume it would be under basis of anyway!!!

android-and-rest-38-638