pingcheck icon indicating copy to clipboard operation
pingcheck copied to clipboard

HTTP content comparison for captive portals

Open jonesmz opened this issue 5 years ago • 5 comments

I have a situation where my OpenWRT device might be deployed behind a captive portal style firewall, which will intercept TCP traffic and redirect, but won't intercept ICMP.

I'd like to have the ONLINE status of an interface be the logical AND of all configured protocols.

Is this practical?

jonesmz avatar Jul 31 '20 16:07 jonesmz

Yes would be possible but unlikely i implement it in the next couple of months...

br101 avatar Aug 01 '20 14:08 br101

I will try my hand at implementing support for this.

Can you give me some suggestions on how an "acceptable to merge" pull request would look from your perspective?

jonesmz avatar Aug 01 '20 17:08 jonesmz

Hmm, thinking about it I don't really understand the requirement. If the captive portal doesn't block ICMP it would go thru and you can check if you are online "theoretically" (independent if the captive portal blocks TCP or not). If the portal always redirects TCP traffic, what do you gain by testing for TCP as well (it will always be positive)? Maybe I misunderstand but I'd like to make sure the feature is useful if i spend time implementing it

br101 avatar Feb 22 '21 13:02 br101

I'm no longer involved in the project that this feature request was opened on behalf of, and no longer intend to work on this feature.

But to clarify my meaning here, my objective was to take the code that was added for this feature request, and enhance it to allow for checking a full http connection with content comparison. E.g. check the public Google or Mozilla captive portal check pages against a static string in the config file.

The reason for wanting this to be done at the level of the pingcheck program is to allow for the event that gets generated when the complex-ping fails to drive higher level program behaviour. E.g. I wanted one centrally located place to say "This connection is able to support general purpose traffic".

jonesmz avatar Feb 22 '21 22:02 jonesmz

Yes that would make sense. Changed the title accordingly.

br101 avatar Feb 23 '21 09:02 br101