I just ran into this limit (trying to sane-ify some page with over 64KB of CSS) and although the link in the OP is no longer alive due to the demise of CastleCops, I managed to retrieve a copy of the patch from the archive and have attached it here for future reference.

There is a hardcoded limit of 32767, which the patch simply changes to 99999, but I believe it should be OK to remove the limit completely and simply rely on common sense and your own discretion on how high you want to be (that didn't come out quite right... but you get the idea )

For those truly paranoid about running the patching executables, to effect the patch you can simply open a hex editor, search for

Code:

81 FB FF 7F 00 00 7E 05 BB FF 7F 00 00

which you should find at offset 0000AF99, and replace with

Code:

81 FB 9F 86 01 00 7E 05 BB 9F 86 01 00
^^^^^^^^^^^ ^^^^^^^^^^^

(The underlined bytes are the hardcoded limit. 00007fffh = 32767, and 0001869fh = 99999. What the code is doing is comparing the limit with the hardcoded one, and setting it to the latter if it exceeds.)

If you want to go the whole hog and remove the limit completely, change one byte to

Thanks for revisiting this.
What effect is bypassing the check completely supposed to have? I tried that using XVI32 hex editor to replace the 7E with EB. Afterward it won't allow anything higher than 99999 in the byte limit box and won't parse code beyond 99999 bytes when set that way. When left blank it reverts to 0. The only differences I encountered when patching was an "AF98" instead of "0000AF99" and an initial "81" in front of the "FB ..." code.

I'd like to go higher, but even at 99999 it's a significant improvement.

Are you referring to the 64K maximum for replacement expressions? If so, that's not something that could be easily patched --- there are 16-bit length values everywhere in the code. I believe you can use the $FILE() command to include longer replacement content.

(One of the work items I still have logged for Proxomitron Reborn is "remove 64K limits".)

Are you referring to the 64K maximum for replacement expressions? If so, that's not something that could be easily patched --- there are 16-bit length values everywhere in the code. I believe you can use the $FILE() command to include longer replacement content.

(One of the work items I still have logged for Proxomitron Reborn is "remove 64K limits".)

There's a 4096 character limit in proxo's replacement string.
Proxo cannot insert more than 4096 character to page directly.

"Replacement Text" In "HTML Web Page Filter Editor" window can only input or show 4095 character, the same limit when read from config or save to config.
Save a replacement string more than 4096 will be chopped off and the first 4095 character will be auto split into three line(2047 2047 and 1) then saved.

There's a 4K line-length limit in config files in general, a 4K limit on patterns, a 2K limit on URL matches, and a 260 limit on bounds matches. Raising them varies in difficulty from moderate to "rewrite the pattern matching engine" because there's assumptions on lengths in many places in the code, and blindly making the limits higher is likely to cause crashes instead.

The following 1 user says Thank You to amy for this post:1 user says Thank You to amy for this postreferrer

(Dec. 25, 2018 10:25 PM)amy Wrote: There's a 4K line-length limit in config files in general, a 4K limit on patterns, a 2K limit on URL matches, and a 260 limit on bounds matches. Raising them varies in difficulty from moderate to "rewrite the pattern matching engine" because there's assumptions on lengths in many places in the code, and blindly making the limits higher is likely to cause crashes instead.

Thank you for all the details.
I've tried use a DBG to raise them varies and get failed many times(100+) last two days.
Now I can giveup because it's too difficult for me.