pstjuste / litter Goto Github PK
View Code? Open in Web Editor NEWLan Twitter over SocialVPN
Lan Twitter over SocialVPN
Litter - Microblogging for the LAN ================================== Litter is a microblogging service designed for the local area network. It uses IP multicasting to send updates to other nodes that is reacheable via multicast (typically a LAN, or a multicast-supporting VPN). It listens on one or more network interfaces defined by the user at startup. The service is accessed through a web interface at http://127.0.0.1:8080. It currently runs on Linux and Windows. Instructions ------------ On Linux, provide the name of the network interface to listen on with the -i option. python litter.py -i eth0 Litter also supports multiple interfaces python litter.py -i eth0 -i wlan0 You can also specify a user id python litter.py -i eth0 -n myid You can also change the TCP port for the web interface python litter.py -i eth0 -n myid -p 8080 On Windows, after you install the Python, go to the src folder and double-click on litter.py Interface --------- To access the web interface, open the browser to http://127.0.0.1:8080 License ------- Public domain for now.
Sometimes going to http://127.0.0.1:8000/ causes the browser to hang for a long time, somehow litter is not sending response back, but when I stop and refresh, things seem to work.
We need to do a query for a hashid before inserting it. If there is a collision, we should only insert the hashid that matches the actual message.
Send hash of public key (hence UID) to gravatar so that we can get Identicon image which maps to the unique key. Also later on provide the ability for someone to map friends to local images as their avatar
change UI to show post time instead of received time
when you click enter while typing a message, it should post.
Hopefully, I can easily port everything to windows with minimal changes
Create shortcut buttons for user such as "Retweet, Reply, and Direct Message"
The python threading module is extremely slow because only one thread executes, sometimes HTTP requests takes a long time if other threads are active such as workerthread or response thread
The UI should truncate messages after 140 characters, and litter servers should ignore messages longer than that (there could be bad clients out there that try to attack you by sending giant messages). Ideally there would be a character count in Javascript shown above the message.
I suggest a "shutdown" button on the web site. This could send a special message to the HTTP thread, which would then tell all the other threads to shutdown. How does this sound?
short term fix: bind only to 127.0.0.1 for HTTP, long term fix; allow setting a username and password when you start your litter server.
If you put a quote in your message, HTTP thread seems to die. I tried two quotes (start and end quotes around a word).
If you change tabs, you don't notice there has been a message. If the title would change, like Gmail, for instance, this would alert you to look.
ERROR:root:'module' object has no attribute 'SO_REUSEPORT'
Traceback (most recent call last):
File "./litter.py", line 82, in init_mcast
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1)
AttributeError: 'module' object has no attribute 'SO_REUSEPORT'
That branch claims to add md5, but you forgot to "git add" it.
regular expression search on tweets, turn http into link
do_POST and do_GET seem to be very fragile. If they have an error, I think only bad things happen. You should put a try block and in the Except return an error message to the browser. The browser should check to see if the result is an error or a good reponse. If it is an error, it can pop up an alert window or something.
Basically, use Dr. Boykin's RSA library to generate public/private key pair, and use private key to "sign/encrypt" every message. This will provide message verification.
Use postids to detect gaps in user posts and make get_posts requests to retrieve those gaps
Allow users to see more links instead of just 10 at load time
Figure out the right keyboard/mouse events to use to properly update the number of characters left in a message
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.