stun:stun.l.google.com:19302This is just a public STUN server for making peer exchange through NAT:
https://github.com/heiswayi/hfs-templates/blob/master/HFSTemplate_AllyssaFramework_v1_2.tplThanks for the link of templates by Heiswayi Nrird. I see there very nice templates.
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...?
<iframe id="iframe" frameborder="0" src="http://findbetterresults.com/?dn=freeshoutbox.net&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).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.
???
- (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.
//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: //message received.
var nickname = this.responseText.split(': ', 1)[0]; //insert nickname
var message = this.responseText.split(nickname+': ', 2)[1]; //insert message
- 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.
$('#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!
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.- Show the number of users online, or even better, have a simple online user list.There is no any signalling about the status "online".
- 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.
- 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.
- Privacy: If possible, save messages using the epoch Unix Time,Nice idea. Seems like private rooms.
to avoid someone automatically stealing all the messages,
since it's currently searching for "message (2).txt", "message (3).txt", etc.
- 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.
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.
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.
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,
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:
You can also check the chat made by DJ, here (http://rejetto.com/forum/index.php?topic=11081.0)(which can give you some new fresh ideas).Thanks for your link. I did test this, but private messages in last version not working.
https://rawr.thatstevensguy.com/I did download Thunderchicken of Glory v4.0.3 and test this.
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) {
$('#chatAudio')[0].play();
} 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>'));
$('#chatAudio')[0].play();
}
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.Thank you, I was using a outdated Chrome version, but it's working fine if I use the latest version. Anyway, my idea was to give wider compatibility among browsers, but only as a suggestion (it's not very important).- 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...
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
This is a sample message!
-----BEGIN PGP SIGNATURE-----
Version: OpenPGP.js v1.6.2
Comment: http://openpgpjs.org
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxx==
xxxxx
-----END PGP SIGNATURE-----
-----BEGIN PGP MESSAGE-----
Version: Keybase OpenPGP v2.0.76
Comment: https://keybase.io/crypto
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxx==
xxxxx
-----END PGP MESSAGE-----
Hello again, @LeoNeeson.OK, thanks for the info. I'll check this out later (and get back to you if I have any questions).
I understand what do you mean about signing message in PGPSuite (https://username1565.github.io/pgp/).
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 (keybase.io).
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:QuoteOpenPGP.js v1.6.2, v2.6.2 and the latest v3.1.0and 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 (https://username1565.github.io/brainwallet.github.io/#sign) and verify (https://username1565.github.io/brainwallet.github.io/#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:Quote-----BEGIN BITCOIN SIGNED MESSAGE-----
Blah-blah-blah - this is a readable text.
-----BEGIN SIGNATURE-----
VrrZoy5Dc6tPWib4TmchBgkc87mrAJg8Pd
HyVlWz2WoVWuMq6dh5I/MQSHtE2Up/1t1q4JYKPfqSNfZzYENvELoOZ2qBCrjN0TkmYWtITT/GMTcuqub+uEr0U=
-----END BITCOIN SIGNED MESSAGE-----
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 (https://username1565.github.io/brainwallet.github.io/#verify?vrAddr=VrrZoy5Dc6tPWib4TmchBgkc87mrAJg8Pd&vrMsg=Blah-blah-blah%20-%20this%20is%20a%20readable%20text.&vrSig=HyVlWz2WoVWuMq6dh5I%2FMQSHtE2Up%2F1t1q4JYKPfqSNfZzYENvELoOZ2qBCrjN0TkmYWtITT%2FGMTcuqub%2BuEr0U%3D) 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 (https://www.tor2web.org/) - without using any unstable DDNS services.QuoteBack 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 Mega.nz does). But it's only an idea or a suggestion, I don't know if it is feasible to implement.Zerobin seems nice, like jsfiddle.net (https://jsfiddle.net/), codepen.io (https://codepen.io/)
and another sites for sharing code notes.
But in the source code (https://github.com/sebsauvage/ZeroBin) this have index.php (https://github.com/sebsauvage/ZeroBin/blob/master/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 (https://username1565.github.io/brainwallet.github.io/?address=1NFEViMdeYT4CcH5XLzPzsjwBiNPq8uRpg#t_addr) or permalink (https://username1565.github.io/brainwallet.github.io/#verify?vrAddr=VrrZoy5Dc6tPWib4TmchBgkc87mrAJg8Pd&vrMsg=Blah-blah-blah%20-%20this%20is%20a%20readable%20text.&vrSig=HyVlWz2WoVWuMq6dh5I%2FMQSHtE2Up%2F1t1q4JYKPfqSNfZzYENvELoOZ2qBCrjN0TkmYWtITT%2FGMTcuqub%2BuEr0U%3D) 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 (https://www.webrtc-experiment.com/file-hangout/), 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 (socket.io, or peer.js)
in the source code. (https://github.com/muaz-khan/WebRTC-Experiment/tree/master/file-hangout)
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 (http://www.rejetto.com/wiki/index.php?title=HFS:_scripting_commands), but as separate template or module for this great portable HFS.
I see this option in chat version from DJ (http://rejetto.com/forum/index.php?topic=11081.0) (but there is '...' bug).
OpenPGP.js v1.6.2, v2.6.2 and the latest v3.1.0and maybe this project for node.js and need server-side module requirements on the node.
-----BEGIN BITCOIN SIGNED MESSAGE-----You can use the text from this message as passphrase in generator tab,
Blah-blah-blah - this is a readable text.
-----BEGIN SIGNATURE-----
VrrZoy5Dc6tPWib4TmchBgkc87mrAJg8Pd
HyVlWz2WoVWuMq6dh5I/MQSHtE2Up/1t1q4JYKPfqSNfZzYENvELoOZ2qBCrjN0TkmYWtITT/GMTcuqub+uEr0U=
-----END BITCOIN SIGNED MESSAGE-----
Back about your chat template, perhaps (to implement private rooms) you can take some ideas for inspiration, by looking this project: ZeroBin (http://sebsauvage.net/paste/) (where the server has zero knowledge of the stored data). They use URL Hash (https://en.m.wikipedia.org/wiki/Fragment_identifier) to exchange a decryption key (the same way Mega.nz does). But it's only an idea or a suggestion, I don't know if it is feasible to implement.Zerobin seems nice, like jsfiddle.net (https://jsfiddle.net/), codepen.io (https://codepen.io/)
Is there possible to using any captcha when some random user do uploading the files to UPLOAD folder??I guess it could be done using a macro that calls a command-line utility that generates a captcha. But it will be complex (at least for me, it's beyond my knowledge and time).
Google capcha.This need Internet, and reCaptcha not working in LAN.
I guess it could be done using a macro that calls a command-line utility that generates a captcha. But it will be complex (at least for me, it's beyond my knowledge and time).I already did this Javascript-canvas-captcha: https://jsfiddle.net/jnrb69gz/1/
I already did this Javascript-canvas-captcha: https://jsfiddle.net/jnrb69gz/1/
Here is my example for uploading files to HFS uploadable folder. Attachment1. [HFS_UPLOADING+fractals.zip]
http://file2hd.comThis using server side software, not client-side.
data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxISEhUTEhIWFRUWGRYZFxgXFxUYFhYVFRUXFxcXFxUYHSggGB0lGxcVITEhJSkrLi4uFx8zODMtNygtLisBCgoKDg0OGxAQGy4lICUtLS0tLS0tLS0tLS0tLS0tLS0tLS0vLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLf/AABEIAPEA0QMBIgACEQEDEQH/xAAcAAABBQEBAQAAAAAAAAAAAAAFAAIDBAYBBwj/xAA7EAABAwIFAgUDAwMDAwQDAAABAAIRAyEEBRIxQVFhBiJxgZETMqGxwfAUQtEjcuEzUvEVQ2LCBxYk/8QAGQEAAgMBAAAAAAAAAAAAAAAAAAMBAgQF/8QAKBEAAgICAgEEAQQDAAAAAAAAAAECAxEhEjFBBBMiUTIUM2FxUoGR/9oADAMBAAIRAxEAPwAScx1tIERtaVCoiGsaSBbeyoVcW4kwSBxsscfT1y2mWhLi8oJpKtgKhcDJm/7KystkeMmkanXCS9ybxk5UZII6rPZzT02HBH6I5XxIYQCDfpCDYprsRV+nTaS4kemy3028oty8CraeMko+QdhMRpMWgm56IhTxAJ8j4PbeFoKfgumxrRVeS47lv7SuVPBxaC/Du+paSx3/AFA0bkDY8Wmbq3v1/ZX2LPoDM3CsVarmiWbqjXq6CAQQT+I6qWnXkQZnqqytfcdoWsZ2EsHn9UfcC0Wuj2XeJi7d3ZZLGUiKbupFgNh/yqWHwdVrQeNzuq+45Id7cfDPXMBnzCVoMJmbHLxHCV3zyOnojeHzdzGi9ir+40V9s9gbUDl0UQeFhsn8R7A2J/QLY5Xjw9u+6YpJrJSUWid2HUTsOiTGSl9NWKgz6ChrMCKVmwqgZJUMAc2h2UppBEmYVcqYdAFJlAdE8YUdFYZThSgKQKZwY6KN2EHREoXfpoAF/wBK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jwLlQ1lYYGOzSiGOjmR2VV1QAGTYIl4iwhMv2AKw+NzYNa5sydkl1b0OjNJYLWbYsu0gGATx0UlSkfKZtMINg3OeRAJjZaTD4B7mt1D4VHLBdLI6ngzBnYqzhMteyb+g/dWRhnSBMQN1dw4Np3VeZPEq0MvdI1FeheG4ayFkGVhPUrV5C2WymUvYuxaNFTqK02rZU6LFYDFpyIZJqTg9Q6V1SQS6lwlMCSgk6XLicAkpA5CSckoAxOMaNDjF4QpGqjAQQdih9XBOk6Rbi6gkqJLq4gBJJJIASSSSAHU9wrVRwjdU3bKIPIuEAczmjrpOb6/ovNsN4emoQ6fdej1cQ7t8IdWp3mEuzoZX2D8BlrKLbCSibWwxom5MpjBv2UVW6xORrZKCSYlSgARuqDK4BlE6R1bKMlceSxRotNwIK1/h6nDFj2SLra+G70wU/0/Yq1YQaphPCilPatZmySBJcBSUoGOAXQE2V0IA6uhchOCAFCS6kpIMYkkkqlgGVxJJACSSSQAkkkkAJ2ygcuJIAiqKCvskkl2dDK+yKnsVE/ZJJYJdmtld3CI5fukkpl0R4CbVr/Df/AEgupLR6fyJu6QVT2rqS2IyscF1cSUIlnU9iSSAHJJJIA6kkkpA//9k=
Can anyone help me to realize this all in one script?For as much I would like to help you, currently I don't have the enough time to try to do something (and my HTML/JavaScript knowledge is very limited), sorry. :( Perhaps dj or Mars have more experience on this...
i don't think the async is the problem: indeed the server has no way to distinguish it, it's totally a client matter.rojetto, I enabled CORS in browser, so this is not cross-domain problem.
The problem, getting a 405, is surely a cross-domain request.
Anyway, in your jsfiddle points to a php file, so i don't see how HFS can be involved.
xhr.open( "POST", "https://zinoui.com/demo/progress-bar/upload.php", true );means: send, the POST-query with file, to the URL: https://zinoui.com/demo/progress-bar/upload.php, with async = true;
XMLHttpRequest.open(method, url, async)When acync = true;
xhr.upload.onprogress = updateProgress;is working,
What tool are you using to view the header? I use Wireshark and chrome built in html console.I just can see the headers of queries - in the tab "Network" in Mozilla Firefox, and Google Chrome.
My next question is are you using a xhtml doc type and file format?No. Just HTML, javascript and XHR queries.
@username1565: Please upload and post the exactly template file you are using that gives you that error, so we can try to debug your error.I already send it, in that jsfiddle.
http://jsfiddle.net/pthoty2e/
Keep in mind that HFS only supports .TPL template format and it doesn't understand .PHP (it will take it like a normal .html file). So, for example, if you use 'upload.php' HFS will take it as a static page like if it was 'upload.html' and that could be the reason of this not working. That's why I've ask you if you can post here the file you are using...That was been example code. Yeap, there is using PHP, but on another server,
xhr.open( "POST", "https://zinoui.com/demo/progress-bar/upload.php", true );If you will change this to false:
xhr.open( "POST", "https://zinoui.com/demo/progress-bar/upload.php", false);and press "Run" again,
xhr.open( "POST", "http://127.0.0.1:80/My_folder_for_upload/", false);And got status OK, BUT after uploading. As you can see, async = false.
xhr.open( "POST", "http://127.0.0.1:80/My_folder_for_upload/", true);And got 405 ERROR - method not allowed. No any progress. And no async=true working.
This all not working, if async = false, and need async = true ;)
client.DownloadDataAsync(new Uri(address));And this working with HFS local URL's. Hm...
rojetto, I enabled CORS in browser, so this is not cross-domain problem.
i don't know what "enabled cors in browser" actually means,If you want, you can test this yourself with extensions to enable CORS.
but i was not saying that cors was disallowed by the browser.
It's HFS not supporting it.
CORS requests happen to generate an extra "OPTIONS" request, and that is not supported by HFS, returning a 405 error, indeed.After testing, you can know the reason of error - definitely, and... How to fix it...
HFS accepts only GET/HEAD/POST requests.
I beautified this chat room, and cookies remember users. You can modify the name in the settings. Added music progress bar and control button, song list can be modified JS, added send button, added the function of returning to the bottom after receiving new message, and added the back to the bottom button. The UI is adapted to the mobile terminal...Congratulations, it's very nice! :) Some suggestions: every user could have a different color (instead of all have the same blue background), and some users chat could go on the right side of the screen, and another users could go on the left side of the screen (that way, it's much easier to read).