Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - username1565

Pages: [1]
Bug reports / Re: invalid link
« on: December 05, 2018, 02:29:22 AM »
Found solve in this thread:
and here:
inserts HTML from filelist.tpl if exists in hfs.exe folder, otherwise produces ASCII file list of the requested folder

To get list with URLs:
1. Create filelist.tpl
2. Write this code there:
Code: [Select]

<playlist version="1" xmlns="">

<a href="http://%host%%encoded-folder%%item-url%">http://%host%%encoded-folder%%item-url%</a><br>
3. Run HFS, add folder with files there (if still not added).
4. Go to http://IP:PORT/folder/?search=.png&rev=1&sort=t
Now there is links lists with full path in the href.
Fullpath URL is the main path to file on the server.
And no any relative pathes in response links.

Best regards.

Bug reports / invalid link
« on: December 04, 2018, 08:33:24 PM »
Need to add fullpath to the link, because path not full, relative and invalid.

1. Run HFS server.
2. Add some "folder" with files there.
3. Go to http://IP:PORT/folder/ - there is the files inside the folder.
4. Open the source code of HTML-page with that response:
and see this:
Code: [Select]
<a href="file1.txt"><img src="/~img47"> file1.txt</a>"file1.txt" - this is relative path for http://IP:PORT/folder/ where this page is generated, and this is - incorrect link.

Need to insert there fullpath:
Code: [Select]
<a href="http://IP:PORT/folder/file1.txt"> file1.txt </a>
I don't know syntax of macroses...

P.S.: I did add there an index.html with the links to all files,
and this seems good with fullpathes... But this is not dynamic page...

HTML & templates / Re: Chat for HFS.
« on: December 02, 2018, 08:19:33 PM »
Is there possible
to using any captcha
when some random user
do uploading the files
to UPLOAD folder??

HTML & templates / Re: Simple contact template
« on: July 26, 2018, 06:27:12 AM »
Wow, you make email form template!
I did try this, but I cann't access to HFS now.  ;D
There is only form when I try to go on my server and no access to the files. Can you fix this?
I see this as separate link "Contact to admin", in standart HFS template.

Also, I did try to using EML version, and I saw this errors:
Requested GET /
Upload failed, Not allowed: New-Message-2018.07.26-at-08.38.03.eml
Requested POST /
This because message try to upload to the root directory on the server.
So need to re-write path as specified folder, which was been opened for uploads:
Code: (javascript) [Select]"POST", "./contacts/");  //Try to upload file to "contacts" folder, using POST query
//Before using this, enable "uploads for anyone": HFS -> folder -> Right click -> Properties... -> Permissions -> Upload -> Anyone -> OK.

You can add this description in your code, and add to the first post - the info about this string at line 155.
Because there is only dot and slash, and no anyone newbie cann't understand...

text messages uploading v0.1b working too. But need to write pathway in the string:
Code: [Select]"POST", "./contacts/");  //at first, enable uploads in "contacts"
Also, macro-method v0.1a is working.
I see in the root directory on HFS server the file "Private-Message-2018.07.26-at-09.07.42.txt"
I see GET link: "/?NameA=test&MailA=test@test.test&SubjectA=test&MessageA=test+test+test&SubmitMessage="
so GET-method using here. I did try to go by this link again, and I see another file with this message.
And no need to open root folder for uploads in this case.
But how to set the folder "/contacts", I don't understand...
I see there is variable %folder%:
Code: [Select]
Best regards.

HTML & templates / Re: private messenger chat
« on: July 26, 2018, 05:35:10 AM »
I did try to using all versions.
Versions V4.5 and V4.6 not have chat.htm in archive.

Only v2.4 working (from chatneu folder inside):
1. Unzip v2.4.
2. add chatneu folder to HFS as real folder.
3. go to http://IP:port/chatneu/chat.htm
4. name: user, text: "test from user".
Now I can check chat.txt file content, in the added folder "chatneu".

Test public chat:
1. Go from another computer to http://IP:port/chatneu/chat.htm
2. User: testuser, see messages from user.
3. text: "test from testuser".
User and testuser see this. OK.

But in this template I see an "..."-error.

Test private messages:
1. Name: user -> to testuser; text -> "test private message from user to testuser"
2. user see this message, testuser see "..."
3. Response from testuser: test -> "Do not see your message, user!"
4. testuser see his message, user see "..."
Chat history for user:
26.07.2018 19:48:30 --- testuser>> ...
26.07.2018 19:47:47 ---  user>>testuser test private message from user to testuser
26.07.2018 19:46:35 --- testuser> test from testuser
26.07.2018 19:46:26 --- testuser hat den Chat betreten.
26.07.2018 19:45:21 ---  user> test from user
26.07.2018 19:44:57 --- user hat den Chat betreten.

Chat history for testuser:
26.07.2018 19:48:30 --- testuser>>user Do not see your message, user!
26.07.2018 19:47:47 --- user>> ...
26.07.2018 19:46:35 --- testuser> test from testuser
26.07.2018 19:46:26 --- testuser hat den Chat betreten.
26.07.2018 19:45:21 --- user> test from user
26.07.2018 19:44:57 --- user hat den Chat betreten.

chat.txt content in chatneu folder:
26.07.2018 19:39:38 --- <b>testuser</b>&gt;  <span style="color:#000000">Do not see your message, user!</span><br>
 26.07.2018 19:38:46 --- <b>user</b>&gt; >testuser <span style="color:#000000">testing testuser</span><br>
 26.07.2018 19:38:09 --- <b>testuser</b>&gt;  <span style="color:#000000">test message from testuser</span><br>
 26.07.2018 19:37:59 --- <i> testuser hat den Chat betreten.</i><br>
 26.07.2018 19:37:20 --- <b>user</b>&gt;  <span style="color:#000000">test</span><br>
 26.07.2018 19:36:55 --- <i> user hat den Chat betreten.</i><br>

As you can see, when one user write to another user the private message,
this user can see this message, but another user saw "...".
Message not displaying for another user and users cann't read private messages,
but in file chat.txt this data is exists.

I see chat.htm in v3.1, but there is no any TO field, and old chat.htm not working
(cann't fill name and don't see prompt to do this.)
Can anyone fix this?

Also, How to using another versions with chat.htm? This file no found there...
Is this possible?

First idea that I have to display private message - download using XHR,
the file chat.txt from "chatneu" folder, and parse this file on client side using JS.
But in this case anyone can read private messages.

So this can be encrypted by assymetric encryption, using JS NaCl (like toxcore),
and "libsodium" JS library, for example, and saved as hex in the chat.txt.
There can be generated public key by passphrase.
Here you can see static public and secret key from static seed "hello":
Keypair - from seed (Uint8Array) "hello" in HEX:
Secret key: 9B71D224BD62F3785D96D46AD3EA3D73319BFBC2890CAADAE2DFF72519673CA7
Public key: D8333ECF53DAC465D59F3B03878CEFF88947EEC57C965105A049A0F5F1B7A510
And also you can see there and example of assimetryc encryption and decription.
from username and password (need to add, then),
can be seed string to generate nacl keypair,
and when username connected to the chat, then he can share his public key to anyone else.
In this case, any user who write to him private message, can do encryption of this message,
using public key of this user. Result can be saved as encrypted hex in chat.txt.
Then, user can do client-side JavaScript decryption of this message,
by using his temporary secret private key.

Best regards.

HTML & templates / Re: Chat for HFS.
« on: July 22, 2018, 05:31:34 PM »
Hello again, @LeoNeeson.
I understand what do you mean about signing message in PGPSuite.
You can sign/verify and encrypt/decrypt the small files, this will be base64 encoded, then.
Also you can do signing+encrypt and decrypt+verify. But yeap, I cann't see there, a readable text.

You cann't get only signed message with readable text there, because as you say, there is using another stansard (
For more secure, result not containing open text, and this is encoded or encrypted and added fingerprint + encoding this.

PGPSuite is based on script kbpgp.js (that means, keybase pgp).
To using openPGP, maybe need to write separate OpenPGP.js library.  ::)
But as you say this already exists, and need to integrate and include this.
Maybe this will be easy, but I don't see, in the Internet,
the working HTML-examples, with included openPGP.js:
OpenPGP.js v1.6.2, v2.6.2 and the latest v3.1.0
and maybe this project for node.js and need server-side module requirements on the node.

And also, at any time, you can yourself do your own fork of this project on github,
download this, rewrite the souce code, and upload new files to your own public branch.

Also, if you want to generate signature only, without encrypting text message (for emailing as example),
and then check signature (verify this message) with leaving readable message - you can using bitcoin signature tool,
for sign and verify readable messages. Other altcoins keys and address - there is available too!
Signing and verify, for not large files, is available there too (as base64 encoded text).

To use this:
1. Generate your own private key, and get address from this key.
For example, I used the message as passphrase to get priv and compressed vertcoin address in next example.
2. Save private key, and address.
3. Sign text or file by private key. You'll see readable message there.
4. Transfer this to someone else, and this can be verified, and will be still readable (if text).

This seems like pgp signature. My example:
Blah-blah-blah - this is a readable text.
You can use the text from this message as passphrase in generator tab,
then get private key, and see the address corresponding to this,
but if you will at first, select in right-side list - Vertcoin.
Address will switch to compressed automatically, because Vertcoin have compressed addresses.

This brainwallet, can be hosted in LAN, using HFS! Code is JS+JQuery only. No any server-side software.
If your IP is static, you can tell in email your own permalink to open for your friends the way to verify signature of your messages.
You can also open the port and using static IP, or DDNS, to make this available from Internet.
And of cource you can using TOR + any tor2web services - without using any unstable DDNS services.

Back about your chat template, perhaps (to implement private rooms) you can take some ideas for inspiration, by looking this project: ZeroBin (where the server has zero knowledge of the stored data). They use URL Hash to exchange a decryption key (the same way does). But it's only an idea or a suggestion, I don't know if it is feasible to implement.
Zerobin seems nice, like,
and another sites for sharing code notes.
But in the source code this have index.php.
I don't see database, like MySQL, but PHP is a server-side language.
Maybe this can be re-writed as HFS templates using scripting commands, because HFS not working as PHP-server.
I didn't saw intently this code and don't working with this...

URL Hash implies GET-query to the server, and JS can emulate this, like t-addr converter link or permalink in brainwallet,
but JS cann't responce as server and tell any files - because this is client-side language.
Maybe this is possible to using URL Hash, if keep-alive peer connection will be opened,
like this WebRTC file-sharing, for example.
This working in 2 tabs in Chrome (I don't test it in LAN without Internet)...
You can see random ID for each private rooms, p2p connection and peer exchange services (, or peer.js)
in the source code.

And still... If by using URL Hash, can be created folders on the HFS server,
then can be available opportunity to use this for create folders,
but not temporary folders, because there is no any option for deletion files and folders for anonymous users
(else backdoor for damage any files from anyone).
And maybe private rooms can be realized, using HFS scripting commands, but as separate template or module for this great portable HFS.
I see this option in chat version from DJ (but there is '...' bug).

Hey, Leo!
You no need to buy or hold any Bitcoins to make digital signature with saving readable text.
As I said, you can using open source brainwallet on client-side, to do signature
for your messages and verify signed messages from anyone.
Here you can see the source code:
And as you can see, this have only JS, CSS, and HTML files. And this project was been forked from brainwallet.
And in my brainwallet (source code here)
there is available to using compressed, and uncompressed private keys and addresses, from any another altcoins.
As you can see, to do signature, need the private key (WIF-format). This is base58Check encoded hex value.
To get this, you can using any 32-byte (256 bit) HEXadecimal string,
as secret exponent in generator tab.
You can encode to hex any text or bits using converter.
Also, your private key can be the sha256 hash from any your own key-file. Bitlength sha256 hash is 32 bytes, 256 bits.

That means you can generate yourself this value, and encode this to base58Check,
then using this to sign and get address for this key,
and then you can using this address as identifier for your signed messages.
No need to buy or hold any bitcoins, or altcoins.
No need to download any software, blockchain, no need to connect the nodes, etc...
Just ECDSA used here on client-site (JS, HTML, CSS), and this seems like PGP messages with readable text.

The simple way to understand the sence for using digital signatures,
is the understanding the sence of asymemtric encryption
(public key - encrypt from anyone, private key - for decrypt for owner public key),
and asymmetric signing (sign using private key by owner the public key, and verify by his public key).

HTML & templates / Re: Chat for HFS.
« on: July 21, 2018, 06:33:27 PM »
After this all - fix. File - chat.js:
Code: [Select]
line 83: //': ' in message bug - fixed.
//message received.
var nickname = this.responseText.split(': ', 1)[0]; //insert nickname
var message = this.responseText.split(nickname+': ', 2)[1]; //insert message

line 89: //multiply sound elements in HTML code - bug fixed.
//add sound and play this.
if ($("#chatAudio").length) {
} else {
$('body').append($('<audio id="chatAudio"><source src="notify.ogg" type="audio/ogg"><source src="notify.mp3" type="audio/mpeg"><source src="notify.wav" type="audio/wav"></audio>'));

line 98: //1000 messages limit with last message in the top - without need scrolling
//display in chat window
var code = '<p>'+'<span>'+nickname+'</span>'+message+'</p>'; //add tags to message
var old_code = document.getElementById('chat-area').innerHTML;
var messages_limit = 1000;
old_code = old_code.split("</p>", messages_limit);
old_code = old_code.join('');
console.log('old_code', old_code);
document.getElementById('chat-area').innerHTML = code+old_code; //display this

Recommend to set messages_limit 100 or 10, because for each message will be working many cycles for largest value.
But if there is many users, they can make a spam, so then need to make this value greather to read needed message.

HTML & templates / Re: Chat for HFS.
« on: July 21, 2018, 04:05:03 PM »
Hello, @LeoNeeson! Thanks for your interest and time for test this.
- (Bug) if we insert ":" in a message, then any text/word after that is not shown.
This because ":" symbol is the delimiter, you can see this in source code and inside the file content.
As you can see in the source code, delimiter is ": " (":+white_space"), so links with https:// is working, for example.
File with message contains next data: "USERNAME,delimiter,message".
This delimiter can be any symbol, or even dynamic delimiter, as the hash from message, for example.  ;D
We can using special unicode characters, like Zero-width space or another symbol, which will be trimmed or cann't be writed.
Just rewrite this strings in chat.js:
Code: [Select]
//message received.
83: var nickname = this.responseText.split(': ')[0]; //insert nickname
84: var message = this.responseText.split(': ')[1]; //insert message
131: name+ ': ';
But I fixed this bug, using this code:
Code: [Select]
//message received.
var nickname = this.responseText.split(': ', 1)[0]; //insert nickname
var message = this.responseText.split(nickname+': ', 2)[1]; //insert message

Also, I see another bug - many sounds elements with id="chatAudio" in the source code in html-page in browser.
This was been fixed by code in last message.

If delimiter will be changed, I see another problem. Anyone can uploading any message with custom delimiter,
then not all messages will be available for each user.
Incrementing message nubmer is automatically for each uploading.
As you can see in the source code, each message saved by POST query, as file with one name "message.txt".

- Automatically scroll-down messages, so we can always see the last posted message.
You can scroll fasly if you press SHIFT button, and click in the end of scroll bar.
But you are right, it can be automatically.
This is client-side software, and you can do with this source code anything, what do you want.

Just using css-code "overflow: scroll" for div element, and Javascript or jquery scrolling functions.
And... I want to say next for you...
When many messages there is exists in textarea, scrolling functions can lagging...
I tested this JQuery method:
$('#chat-area').animate({ scrollTop: window_height + chat_height }, 'slow', function (){});
So better way to already see last message, will be next... Just invert message filling in textarea!
Code: [Select]
function get_file(number){...
    xhr.onload = function(){
        //replase this
        //var code = '<p>'+'<span>'+nickname+'</span>'+message+'</p>'; //add tags to message
//document.getElementById('chat-area').innerHTML += code; //display this
        //to this ->
        var code = '<p>'+'<span>'+nickname+'</span>'+message+'</p>'; //add tags to message
document.getElementById('chat-area').innerHTML = code + document.getElementById('chat-area').innerHTML; //display this in top
Now, last message you can always see in the top of textarea, without any scrolling.
As you can see all textarea data will be copying every time when this will be filled.
So you can limit this in this step, for example to see last 100, 1000 messages only and not more than.

For example, in last message, I did set limit as 1000 messages, using split html content by '</p>' delimiter with 100 messages limit.
I did test '<p>' and '</p>' tags inside the messages, and I see all tags is closed autumatically in my browser, without any bugs.

- Show the number of users online, or even better, have a simple online user list.
There is no any signalling about the status "online".
Maybe, to do this, need to create a separate file, and rewrite this when user authorized,
and correct this, if user is not active within some time limit (not wrote any message).
But any rewrition of file will opening the backdoor to do damage this file from anyone.
I think will be better to using another server-side script, implemented to HFS.

- Save/remember nickname on a cookie, and allow change nickname when clicking on it.
Is HFS working with cookies? I see only 1 cookie file with HFS_SID in my browser settings.
If cookies can be sent, then you can rewrite the souce code and don't ask username in prompt, if cookie is exists.
I wrote this chat as simple and portable IRC-althernative, to working in TOR.
I have .onion domain and this is better than any DDNS. And as I remember, Tor Browser have strength cookies-policy.

- Add an optional 'Send' button (as a fail-over, for old browsers not detecting when the 'Enter' key is pressed).
This is HTML/JS - coding. You can add this yourself using standard form methods. And post the source code in this thread, then.
In this case javascript functions can be called by methods form onsubmit="function_name()", and onclick="function_name()"
By default, message will be sent after press "enter", according JQuery code
//textarea functions...
in the file chat.js
I don't know what browsers cann't using JQuery, but this can be excluded too.

- Privacy: If possible, save messages using the epoch Unix Time,
to avoid someone automatically stealing all the messages,
since it's currently searching for "message (2).txt", "message (3).txt", etc.
Nice idea. Seems like private rooms.
But as I said I created this as analogue of public IRC-channel in Local Network.
In IRC you can see private rooms too, but this is a channel, and this need Internet connection.
For example, you can connect here: to #tox channel with any username,
and do chating online with Tox developers community.
In LAN IRC - not working... And this HFS-chat working in LAN.

If number in filename will be changed, then any random user cann't do loading this simply.
I saw the problem in this, earler, but now...
How I see private rooms implementation?
1. Alice and Bob, select the key and do key exchange using DH.
2. Both calculating hash(from this key).
3. Rewtire "message" prefix (not number) as "hash(from_key)" and save the messages, encrypted by this key.
(For example, can be using AES algoritm to do encryption/decryption message content, and save this as HEX.)
 - No any user must not and cann't download this messages.
 - Admin cann't read this messages (he don't know key for encryption/decryption.)
 - Admin can delete this messages, as admin for files in folder.
 - Bob and Alice can download messages, by simply incremention suffix (number about which you say).

- Add a private chat mode: when a private chat with some user is started, a new window is opened, and a new -temporal- folder is created on HFS, with a random folder name (for example "TempChat-5560AFHG") so, another users can't guess the folder path and steal or retrieve private chats.
Hehheh... This folder must be uploadable, and only HFS-admin can switch this.
To using security, as I said, Alice and Bob can using encryption/decryption in public chat.
No any user cann't read message without decryption key in this case,
but so many messages can be available in public to download...
If folder not recursively hidden, then any user can see file prefix,
and then save the same files with spam random values,
and in this case, Alice and Bob cann't decrypt this, but will got spam-loading.
So the private rooms, as I said Alice and Bob can using hash of key as prefix for filename with messages.
And in this case loading to server will be lower than in the case with just encrypted messages in public room.

And when one of the users close your browser, the private chat ends, and the another user gets a message like 'John has closed this chat' (similar as IRC).
Hm... This seems like WebRTC. Peer2Peer connection with random identifier for each private chat-room.
To make p2p connections, need the stun-server, or another relay-server - must be implemented in server-side software for make peers exchange.
To see any status value, need to do signalling between users.
All signals will be go to the server in this case, and as you can see this is HFS server, then signals will be saved AS FILES.
AS MANY-MANY FILES (without deletion, of course)...  :D
So will be better to do peer exchange, and directly data exchange between the peers.
Then will be possible to do video-chat, or voice chat, like VOIP, with lowest server loading.

And then, we can also automatically delete that temporal folder, when both parts close the window.
You cann't delete the folder, because in this case, this deletion can do anyone then.
But admin can do special permissions for you, as for authorized user.
In this case you must to contact to admin, and do logining to HFS server.

We can also create a -permanent- private chat (with a folder name like "PermChat-EASY777"), adding a button to make it, so if 2 users know the 'private chat name' (aka: private chat folder name), for example "EASY777", then, they can join the chat anytime without having to post anything on the public chat (that folder stores the messages permanently).
Hm... In this case, you need to be authorized on admin's HFS-server, or download HFS yourself, create folder with your own name,
and rewrite the pathways in HFS_JQuery_chat. Folder must be uploadable.
You can hide this folder! And you can do this - recursivelly hidden! To hide files inside this folder from anyone. Yeap...
But not from sniffers, because XHR using DNS. In TOR this can be secure, because TOR use encryption.

So basically, we can have a public chat, and a private chat and all without a database or anything special.
As I wrote in the top, this is possible in 1 uploadable folder, if:
1. Messages will be encrypted. (Can be used assymetric cryptography!)
2. Prefix for files will be changed in the source code.
3. Auto-increment for files containing the encrypted messages with this prefix.
And more no need nothing. To use assymetric cryptography can be used JS library, like js-nacl,
RSA, Diffie-Hellman key exchange, etc... You can find this here + BigInteger:

You can also check the chat made by DJ, here (which can give you some new fresh ideas).
Thanks for your link. I did test this, but private messages in last version not working.
There is "..." for receiver. Template not working for me, in HFS 2.2.
I did download Thunderchicken of Glory v4.0.3 and test this.
I see "mini chat" with id="Shoutbox" and the folder "template\shoutbox"
I see there is each message in each file too.
There is IP of user and timestamp in filename, and HTML content inside the file.
This chat is not secure if IP leak to admin, because any admin can be not good, IMHO.

Best regards, and have a nice day.

HTML & templates / Re: Chat for HFS.
« on: July 14, 2018, 09:09:09 PM »
Thanks for the link of templates by Heiswayi Nrird. I see there very nice templates.
Also, I see there is working hfs.exe too - this is version 2.2f.

There already chat boxes in other templates on the forum such as thunder chicken of glore, etc etc...
Can you tell me the link for templates:
thunder chicken of glore, etc etc...

I tryed use "Allyssa Framework v1.2" from your link, and I see there, inside HTML code:
Code: [Select]
<iframe id="iframe" frameborder="0" src=";pid=9PO755G95"
style="display: none !important;"></iframe>
And this is not working with Internet. I see the errors in console.log (F12 button in browser).
Also, this chat must not to working WITHOUT INTERNET,
and I want to see the chat to be workable in LAN (Local Network).

My chat is working in LAN without INTERNET, but this is not so ellegant.
If there will be 1 million messages, each user must to save this all - as different files, for each page-request.  ;D
This is only demo-example for you all, to think about it.

I don't know if you asking for help on addons or just shrong something you'd like to see implemented in to hfs.
I don't see any addons with chat, so I just leave this code here.
At last, in the future, maybe I want to see good server-side chat inside HFS,
without any rooms or channels on another servers/services.

Maybe there can be possible, to realize VOIP, video conference, torrent tracker, and another P2P technologies,
if relay server or stun server will be using to do connection between LAN-peers, without need the Internet.

Best regards.

HTML & templates / Re: Chat for HFS.
« on: July 08, 2018, 01:21:42 PM »
Also, I want to recommend you all to see this:

This is web-based interface for Tox!
Here is source code: and there is server-side code, writed as .go files.
This must to be compiled and this is a different server.
GO-installer have over 100 MB size. Not good for downloading.

Utox, Toxcore, or
this all is a P2P-programs, yes this can working in LAN,
and there is, inside the p2p tox-programs, already exists server-side soft.
But tox-programs is not web-based chat. So, webTox can make this web-based.

In this case, compiled go-files code in server-side of webtox
can be included in HFS server code, and working if tox-node will be running.
But I think this will make more sence, if WebTox will be included in server-side code for tox-programs.

So I just leave this here, and you can learn Tox working principles
and include something of this in HFS.
For example, NaCl encryption, with generate private key and public key,
or DHT to make peer exchange - all this can be inside HFS.

HTML & templates / Re: Chat for HFS.
« on: July 08, 2018, 01:10:36 PM »
Also, as example, I can leave here this chat:
If two tabs with this, in browser, will be opened together, you can chat with yourself.
This chat not a p2p, and this need to register room or channel on the site pubnub.
But I think traffic will go between peers, and the channel don't save the traffic.
I think this, because reloading the page not give all previous messages.
In this case pubnub channel working as relay server or stun server for peer exchange and then chat is really P2P.
This can working in LAN if stun server or relay server will be inside HFS.

Also, I want to recommend you all to test this WebRTC-examples:
There is examples for file-sharing, voice chat, and webcam-chat,
but this not a p2p, not working in LAN without Interned,
and this all working with requirements for runing server-side code,
and need, or Peer.js to be runned on node.js.
Node.js source code is to large to be included in HFS server but maybe can using
minify and compactly implementation for requirements only this all.

HTML & templates / Re: Chat for HFS.
« on: July 08, 2018, 12:56:47 PM »
Maybe there is possible to add websockets, or another methods, like WebRTC.
Maybe there is possible to add file sharing, webcam-streaming, or voice chat.
In this case, HFS can working just as relay-server (like IRC), or as a STUN-server, without large traffic loading.
STUN server need only to make peer exchange!

For example, this chat
can be downloaded as zip, and this working in HFS, like web-based p2p chat,
but only when Internet connection exists.
Else, this not working, and in script.js you can see this:
This is just a public STUN server for making peer exchange through NAT:

In the case of using stun server or relay servers, no need any loading of traffic on HFS,
for example if webcam or voice chat will be using by users.
This users will be a peers, will connected each by each,
and stun server inside HFS
will make the warranty of stable peer exchange in this P2P chat.

HTML & templates / Chat for HFS.
« on: July 08, 2018, 12:05:22 PM »
Hello. I'm from here:

I'd implemented the file-chat for HFS, using Javascript and JQuery.
This connected to HTTPFileServer, using XHR-queries (you can see this in browser, in console.log).

Source code you can find in attached file, then you can test this.
To make this workable, put (by using drag and drop)
the folder "Upload_messages" inside the main folder of this chat in HFS
and make this uploadable for anyone.

Best regards.

Pages: [1]