473,405 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

HTTP Proxy server in python


Hi,

I am a python newbie but have c/c++ experience.

I have a small Lan (windows 2000 sever + some win 98 machines).
The win2k connects to the internet using a dial-up connection. What i need
to do is to allow users, who would come from win98 machines to use internet
for a specific amount of time. For example, if userA has been alloted twohours
then he can no longer access internet from the win98 machine after expiring those
two hours.

I am thinking of doing a proxy server for this purpose in python that will have
a list of users and their hours, and would require logging in by the user, calculate
their times etc.

So, is this the best way of doing this? if not what else can be done? (what ever the
solution, i would like to implement in python)

If proxy server is a good idea, could someone give me an outline of how to do it?
for example, should i use a database for users (mysql?) or just a text file. How
would
i know if a user has logged off? any links on the net?

Thanks...
---- Msg sent via Spymac Mail - http://www.spymac.com

Jul 18 '05 #1
3 5675
On Mon, 31 May 2004 23:13:33 -0600 (MDT), Muhammad Ali
<mu**********@spymac.com> wrote:

If proxy server is a good idea, could someone give me an outline of how to do it?
for example, should i use a database for users (mysql?) or just a text file. How
would
i know if a user has logged off? any links on the net?


Well, my first thought is to write a script to harrass them
mercilessly with emails whenever they use the internet too much.

But at far as proxy, Squid is a proxy and runs on win2k. Hmmm,
outline:

1. Setup Squid
a. require passwords to use proxy
2. Setup python to analyze access.log
a. analyzing the output of a 'tail -f' would give you on the
fly data.
b. change the password of anyone over usage
c. change password back when they have more minutes.

If they all had static IPs, you could block them with ACLs instead of
passwords.

Alternatly, you could hit them with a stick when they use too much
internet. People don't like being hit with sticks. They'd prolly
stop.

It's the middle of the night here, and I'm sure someone else may have
a better idea, if this doesn't make sense.
Jul 18 '05 #2
Muhammad Ali wrote:
I am thinking of doing a proxy server for this purpose in python that will have
a list of users and their hours, and would require logging in by the user, calculate
their times etc.

So, is this the best way of doing this? if not what else can be done? (what ever the
solution, i would like to implement in python)


A list of proxy servers implemented in Python can be found here

http://xhaus.com/alan/python/proxies.html

L.
Jul 18 '05 #3
On Wed, 02 Jun 2004 02:03:26 +0200, Ludovico Magnocavallo
<lu**@asiatica.org> wrote:
Muhammad Ali wrote:
I am thinking of doing a proxy server for this purpose in python that will have
a list of users and their hours, and would require logging in by the user, calculate
their times etc.

So, is this the best way of doing this? if not what else can be done? (what ever the
solution, i would like to implement in python)
A list of proxy servers implemented in Python can be found here

http://xhaus.com/alan/python/proxies.html

L.


A place to buy sticks can be found here

http://www.sticks.org/buy_sticks.htm

In case you go with the "hitting with sticks" solution.
<{{{*>

..

Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Chris Gray | last post by:
Is there such a beast? In particular, I'm looking for a production-quality proxy server fully compliant with HTTP/1.1 written in Python. If there isn't, is there anything that comes close? ...
2
by: Fuzzyman | last post by:
Xavier Defrang has written an HTTP Debugging Proxy. This message is basically for him - since he says on his website that he inhabits this newsgroup. I downloaded this and ran it , with the...
7
by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. #...
0
by: Carl Waldbieser | last post by:
**** Post for FREE via your newsreader at post.usenet.com **** When using urllib2.urlopen() on my Windows 2000 machine at work, I was puzzled that I kept getting back authentication errors from...
5
by: yoda | last post by:
I've recently configured my network such that I use squid as a http proxy. I'd now like to be able to use setuptools and ez_setup via this proxy. Is this possible? If so, how do I do it? The...
0
by: benboals | last post by:
Note: this is in reply to a message from August 2 which i found searching for help on my own problem. I couldn't seem to reply to it, but a friend suggested that simply using the same subject...
0
by: Alimah | last post by:
My objective is to log onto a wiki account (specifically wikipedia) using the http proxies provided by them (145.97.39.130 - 145.97.39.140:80). The operating system is Windows XP/Windows Server 2003....
0
by: Dan Lenski | last post by:
Hi all, I've recently written an HTTP proxy server for the Motorola E815 cell phone, based on Suzuki Hisao's "Tiny HTTP Proxy" (http:// www.okisoft.co.jp/esc/python/proxy/). This cell phone...
0
by: Astan Chee | last post by:
Hi, Im trying to implement the logic from http://www.hypothetic.org/docs/msn/general/http_connections.php to a simple python code using urllib2 and some parts of urllib. Im behind a http proxy...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.