These are chat archives for Nithmr/ProxyHelper

29th
May 2016
Utkarsh Raj
@clearnote01
May 29 2016 07:09
it is better if done in the main repo imo. also, i think for now it's good enough to be merged and also more people would be able to see and test it, see if supports their platform, report bugs, etc.
Akarshit Wal
@Akarshit
May 29 2016 07:12
Merging it.
Utkarsh Raj
@clearnote01
May 29 2016 08:35
opened issues, thanks
Akarshit Wal
@Akarshit
May 29 2016 08:37
Can you change the script so that name of the network is not used. Just ping all the proxies.
Utkarsh Raj
@clearnote01
May 29 2016 08:38
Well, yes I can. But I feel the current behaviour might be more helpful.
For example, for KBH NW there should not be a need to check 24.2/3 proxy but just 12.2/3/4 etc
Akarshit Wal
@Akarshit
May 29 2016 08:39
Lets discuss this.
Utkarsh Raj
@clearnote01
May 29 2016 08:40
If proxy.dbase is sufficiently large, there should be enough proxies already
Akarshit Wal
@Akarshit
May 29 2016 08:40
See if we ping all the proxies, the script would become independent of changing network names.
Utkarsh Raj
@clearnote01
May 29 2016 08:41
Yes, I can see the benifits...
It would make it possible to support Windows also
which is impossible currently
Akarshit Wal
@Akarshit
May 29 2016 08:42
Ya so let's do this.
Plus there are a few things @himanshusingh-15 has to suggest also.
Utkarsh Raj
@clearnote01
May 29 2016 08:44
Well... I am still kind of apprehensive of making that change rn, let me think for a while
Yes Sir, suggestions are very welcome @himanshusingh-15
Akarshit Wal
@Akarshit
May 29 2016 08:47
We can do one thing, make a separate branch with the feature implemented and send the link of that branch here. @himanshusingh-15 is in the campus and thus could see the performance comparison.
If we keep the name to proxy mapping, it will be a lot of effort for all the users to change the name when the name of the network changes.
This will not be aligning with our goal to keep this script 'one command, one time'
Utkarsh Raj
@clearnote01
May 29 2016 08:53
Well it's not exactly too cumebersome. The proxy.dbase file would contain all the proxies that are possible for a given network, it should be repository kind of thing where we will map all the network available in the campus with the available proxies. So, ideally a user would never need to edit proxy.dbase unless he is adding a personal network.
*cumbersome
Akarshit Wal
@Akarshit
May 29 2016 08:56
Yes I understand that. OK I think we are stuck here. Since the votes are 1-1 let's do what @himanshusingh-15 says. Cool?
Utkarsh Raj
@clearnote01
May 29 2016 08:56
I am apprehensive primarily due to the efficiency concerns. Suppose, I am connected to the "EED" network. The only possible proxies there are 24.2 and 24.3. So with a file only 2 networks will be checked to get the faster proxy. But without a dbase, we need to ping 6-7 proxies each taking approx 4 seconds
So yeah... I think a better way would to implement this feature as an option
like give the user a choice if he wants to check all proxy or not. like a "sudo ./auto-proxy.bash --auto-select" or something :P
Akarshit Wal
@Akarshit
May 29 2016 08:58
Could something be done so that if a proxy is not returning any data in 2-3 pings we don't ping it further?
Utkarsh Raj
@clearnote01
May 29 2016 08:59
yes there is a timeout...
but it is still 3-4 sec each * 8-9 proxies
which I feel is redundant
Akarshit Wal
@Akarshit
May 29 2016 09:00
So what about doing this parallely?
That was the initial plan IIRC.
Utkarsh Raj
@clearnote01
May 29 2016 09:01
i don't know... i might do it in python
but definitely can't in bash
Akarshit Wal
@Akarshit
May 29 2016 09:01
Does doing it parallely sounds cool to you? It does to me.
Utkarsh Raj
@clearnote01
May 29 2016 09:02
Yeah, it does sound good...
Akarshit Wal
@Akarshit
May 29 2016 09:02
Yes, that's why we were thinking of buiding this as a python application.
Utkarsh Raj
@clearnote01
May 29 2016 09:02
actually I think it might work
Akarshit Wal
@Akarshit
May 29 2016 09:02
OK so let's do the parallel implementation of this.
And we will be pinging all the proxies simultaneously.
Cool?
Himanshu Singh
@himanshusingh-15
May 29 2016 09:03
mapping network name with the proxy may cause problem. As for wired connection various names comes such as wired connection 1 or EED, etc
Akarshit Wal
@Akarshit
May 29 2016 09:04
@clearnote01 yup ^ happens a lot.
Utkarsh Raj
@clearnote01
May 29 2016 09:05
okay.... seems logical so
Himanshu Singh
@himanshusingh-15
May 29 2016 09:05
so if a user is connected to a wired network and its name is EED then it will ping 24.3 instead of 16.2 and as a result it will not set the proxy because it wont be able to ping that proxy.
Utkarsh Raj
@clearnote01
May 29 2016 09:05
will add this feature
Himanshu Singh
@himanshusingh-15
May 29 2016 09:05
ok
Utkarsh Raj
@clearnote01
May 29 2016 09:06
Yeah, the issue was it will still take some time for that
but if we run the ping in parallel of course we bypass the efficiency iss
*issue
Himanshu Singh
@himanshusingh-15
May 29 2016 09:06
we can do this
Utkarsh Raj
@clearnote01
May 29 2016 09:07
umm... how exactly? Any idea how we ping in python? :D
I think python + bash is the way to go now
Get the best proxy by python and set it using the auto-proxy.bash script
Himanshu Singh
@himanshusingh-15
May 29 2016 09:09
yeah we can do this
Akarshit Wal
@Akarshit
May 29 2016 09:09
No idea about that, I have asked @mr-knownothing if he is interested in contributing. He knows stuff about python. Waiting for his response.
Himanshu Singh
@himanshusingh-15
May 29 2016 09:09
then you have to run the bash script from the python script
Utkarsh Raj
@clearnote01
May 29 2016 09:10
I was thinking about running python script from bash
Himanshu Singh
@himanshusingh-15
May 29 2016 09:10
you can do that also
Utkarsh Raj
@clearnote01
May 29 2016 09:10
both are fairly easy to implement though :)
Akarshit Wal
@Akarshit
May 29 2016 09:11
I have opened #6 and #7.
Utkarsh Raj
@clearnote01
May 29 2016 09:11
Well I know @mr-knownothing hasn't been into python for very long
:P
Akarshit Wal
@Akarshit
May 29 2016 09:11
@clearnote01 Do you know Sarv Shakti?
Utkarsh Raj
@clearnote01
May 29 2016 09:11
stackoverflow would have something I suppose
Yeah, batchmate, next door neighbour in MBH
I know him
Akarshit Wal
@Akarshit
May 29 2016 09:12
OK then let's do this the developers way. By searching on google :)
Seems like they are all using "subprocess" module to run bash command in python
Akarshit Wal
@Akarshit
May 29 2016 09:19
Is there a way to do this so that we can support windows too.
Utkarsh Raj
@clearnote01
May 29 2016 09:19
Yeah, I am searching for that as well... there should be one...
Akarshit Wal
@Akarshit
May 29 2016 09:20
OK. I have to leave now. Msg here if you have any doubt.
Utkarsh Raj
@clearnote01
May 29 2016 09:20
Yes Sir
I will be working on the feature ASAP
Akarshit Wal
@Akarshit
May 29 2016 09:21
@clearnote01 No "Sir" dudw
*dude
Utkarsh Raj
@clearnote01
May 29 2016 09:40
~~ accha, smjh gye h hm bhaiya~~
*^ accha, smjh gye h hm bhaiya
Akarshit Wal
@Akarshit
May 29 2016 10:02
NO 'bhaiya' too
Utkarsh Raj
@clearnote01
May 29 2016 10:05
ik xD