A LAN server discovery web app

A LAN server discovery web app


Table of Contents

  • Requirement
  • Next movement
  • how to deploy the service?

1 Requirement

the purpose of this project: Many services were running in my desktop environment at the company LAN, but the IP address was always alternate after I reboot, so my initial intent to develop this app is to let my fellow colleagues detect my desktop's IP address much quickly.

this solution is to run a HTTP server on my desktop, and the client must post request at least with a key/value pair: req=get_ip. Then a client scan all the LAN IP address with that request, my computer will response with {'status' : 0, 'ret':ip_address}.

2 Next movement

Since I am studied a lot of certification and encryption knowledge recently, I guess the next target of this project is to add a certificate process to reject the fake one.

The simple ways were to employ an asymmetry encryption algorithm like RSA, then client generate a random number first, then it encrypt this number with a public key, post it on the server side. After the server received the ciphertext, it decrypts it with the private key, and send the result back, the client then can compare the result with the original random to judge whether it is the right server.

3 how to deploy the service?

I use the supervisor, a python process management tool, to deploy that web app. The HTTP service was written by the tornado. And I use a thread pool on the client side to short the search time.
You can refer the source code: https://github.com/suzp1984/parrot/tree/master/python/web/sdp

Comments

Popular posts from this blog

Bluedroid stack in android

How to setup a NAT server?

Network programming in elisp