New Mars Forums

Official discussion forum of The Mars Society and MarsNews.com

You are not logged in.

Announcement

Announcement: This forum is accepting new registrations by emailing newmarsmember * gmail.com become a registered member. Read the Recruiting expertise for NewMars Forum topic in Meta New Mars for other information for this process.

#201 2022-12-15 07:24:57

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,422

Re: Java (r) or Javascript Computer Language

For SpaceNut re JavaScript initiative ...

Here is a collection of snippets generated on a Chromebook...

TestID12500: "<th class="tcr" scope="col">Registered</th>↵                </tr>↵            </thead>↵            <tbody>↵                <tr>↵                    <td class="tcl"><a href="profile.php?id=425917">TestID12500</a></td>↵                    <td class="tc2">Member</td>↵                    <td class="tc3">0</td>↵                    <td class="tcr">2017-11-27</td>↵                </tr>↵            </tbody>↵            </table>↵        </div>"
TestID12501: "<th class="tcr" scope="col">Registered</th>↵                </tr>↵            </thead>↵            <tbody>↵                <tr>↵                    <td class="tcl"><a href="profile.php?id=423955">TestID12501</a></td>↵                    <td class="tc2">Member</td>↵                    <td class="tc3">0</td>↵                    <td class="tcr">2017-08-29</td>↵                </tr>↵            </tbody>↵            </table>↵        </div>"
TestID12502: "<th class="tcr" scope="col">Registered</th>↵                </tr>↵            </thead>↵            <tbody>↵                <tr>↵                    <td class="tcl"><a href="profile.php?id=423733">TestID12502</a></td>↵                    <td class="tc2">Member</td>↵                    <td class="tc3">0</td>↵                    <td class="tcr">2017-08-19</td>↵                </tr>↵            </tbody>↵            </table>↵        </div>"
TestID12503: "<th class="tcr" scope="col">Registered</th>↵                </tr>↵            </thead>↵            <tbody>↵                <tr>↵                    <td class="tcl"><a href="profile.php?id=424086">TestID12503</a></td>↵                    <td class="tc2">Member</td>↵                    <td class="tc3">0</td>↵                    <td class="tcr">2017-09-05</td>↵                </tr>↵            </tbody>↵            </table>↵        </div>"
TestID12504: "<th class="tcr" scope="col">Registered</th>↵                </tr>↵            </thead>↵            <tbody>↵                <tr>↵                    <td class="tcl"><a href="profile.php?id=427173">TestID12504</a></td>↵                    <td class="tc2">Member</td>↵                    <td class="tc3">0</td>↵                    <td class="tcr">2018-01-13</td>↵                </tr>↵            </tbody>↵            </table>↵        </div>"
TestID12505: "<th class="tcr" scope="col">Registered</th>↵                </tr>↵            </thead>↵            <tbody>↵                <tr>↵                    <td class="tcl"><a href="profile.php?id=427339">TestID12505</a></td>↵                    <td class="tc2">Member</td>↵                    <td class="tc3">0</td>↵                    <td class="tcr">2018-01-18</td>↵                </tr>↵            </tbody>↵            </table>↵        </div>"
TestID12506: "<th class="tcr" scope="col">Registered</th>↵                </tr>↵            </thead>↵            <tbody>↵                <tr>↵                    <td class="tcl"><a href="profile.php?id=432285">TestID12506</a></td>↵                    <td class="tc2">Member</td>↵                    <td class="tc3">0</td>↵                    <td class="tcr">2019-09-25</td>↵                </tr>↵            </tbody>↵            </table>↵        </div>"
TestID12507: "<th class="tcr" scope="col">Registered</th>↵                </tr>↵            </thead>↵            <tbody>↵                <tr>↵                    <td class="tcl"><a href="profile.php?id=431065">TestID12507</a></td>↵                    <td class="tc2">Member</td>↵                    <td class="tc3">0</td>↵                    <td class="tcr">2019-03-06</td>↵                </tr>↵            </tbody>↵            </table>↵        </div>"
TestID12508: "<th class="tcr" scope="col">Registered</th>↵                </tr>↵            </thead>↵            <tbody>↵                <tr>↵                    <td class="tcl"><a href="profile.php?id=423734">TestID12508</a></td>↵                    <td class="tc2">Member</td>↵                    <td class="tc3">0</td>↵                    <td class="tcr">2017-08-19</td>↵                </tr>↵            </tbody>↵            </table>↵        </div>"
TestID12509: "<th class="tcr" scope="col">Registered</th>↵                </tr>↵            </thead>↵            <tbody>↵                <tr>↵                    <td class="tcl"><a href="profile.php?id=427112">TestID12509</a></td>↵                    <td class="tc2">Member</td>↵                    <td class="tc3">0</td>↵                    <td class="tcr">2018-01-12</td>↵                </tr>↵            </tbody>↵            </table>↵        </div>"
TestID12510: "<th class="tcr" scope="col">Registered</th>↵                </tr>↵            </thead>↵            <tbody>↵                <tr>↵                    <td class="tcl"><a href="profile.php?id=425280">TestID12510</a></td>↵                    <td class="tc2">Member</td>↵                    <td class="tc3">0</td>↵                    <td class="tcr">2017-10-31</td>↵                </tr>↵            </tbody>↵            </table>↵        </div>"
TestID12511: "<th class="tcr" scope="col">Registered</th>↵                </tr>↵            </thead>↵            <tbody>↵                <tr>↵                    <td class="tcl"><a href="profile.php?id=432378">TestID12511</a></td>↵                    <td class="tc2">Member</td>↵                    <td class="tc3">0</td>↵                    <td class="tcr">2019-10-08</td>↵                </tr>↵            </tbody>↵            </table>↵        </div>"
length: 12
__proto__: Storage

In today's work session (if all goes well) I'll try to read these snippets at the end of a run, and generate a small report.

To begin with, I'll attempt to just display the results on the screen.  Later, if that succeeds, I'm thinking of attempting to write a file.

Apparently, that will require asking the operator for permission to write a file.

For those with greater knowledge who may look in on this learning exercise, there is a format called JSON which may be attractive for collecting the information that appears in the text based snippets above.  For now, since text is working, that is the mode I'm using.  Since this initiative is open to the public, anyone is welcome to run the programs and make improvements.

The key capability that remains unsolved is how to set up a proxy to handle CORS requirements to protect against hackers.  If someone knows how to do that, and is not already a member of the forum, see the Recruiting topic for contact procedures.

The Setup and Worker seem to be running reliably on multiple operating systems and with at least three different browsers.  This capability was (and remains) a goal of the initiative.  The next unknown is reliability of the localStorage feature for input.  That will be explored today, if all goes well.

(th)

Offline

#202 2022-12-15 12:11:44

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,422

Re: Java (r) or Javascript Computer Language

For SpaceNut re JavaScript initiative ...

I hope you've been saving the new versions as they are published in the forum.

In order to save space on Dropbox, I've been using the same name for updates.

It appears that Dropbox is serving the current version of Worker.htm if someone clicks on a link for an earlier version.  That might be (and probably would be) a bit confusing, if a person is trying to follow development of the programs.

Today's update to Worker provides a little report after processing the TestID's.

https://www.dropbox.com/s/pnemvchyw15fh … r.htm?dl=0

To save you (and anyone else who might be following developments) time, here are the other two files needed for a test run.

https://www.dropbox.com/s/n18o5nj76k3r2 … p.htm?dl=0

https://www.dropbox.com/s/8kc0k2ujbpi5f … o.txt?dl=0

Remember to request permission to use the Proxy Demo server.
And start Setup first.

This version leaves the localStorage items behind.  The next version will remove them after the report.

Offline

#203 2022-12-15 19:57:09

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,422

Re: Java (r) or Javascript Computer Language

For SpaceNut re JavaScript initiative

Here is a test run over 100 TestID's, performed on Ubuntu 22.04 using Chromium.

JavaScript Worker Script for TestID Utility

Version 01 on 2022/12/15 Updates: Read URL - this version reads localStorage

Version information is saved at top of Script section

Verified: Integer Start: 10000 Integer End: 10100 Path: file:///home/tahanson/Runtime/runlog.txt

StartID
10000
EndID
10100


Program will click hidden button below after Fetch returns with data


Worker Called by Setup: Run Status

runReport: Progress detail is to be reported here
Proposed Path is: Runtime
whiteBoard: Temporary data goes here
CurrentID: 10101
StartID: 10000
FinishID: 10100
RetryCount: 00102
Reporting from fx4_run after load event
Input to Worker accepted
Finished Processing! Current ID > FinishID
Starting Report
Registered TestID10000 Member 0 2017-04-26
Registered TestID10001 Member 0 2017-04-11
Registered TestID10002 Member 0 2017-05-15
<snip>
Registered TestID10097 Member 0 2017-05-10
Registered TestID10098 Member 0 2017-04-28
Registered TestID10099 Member 0 2017-03-09
Registered TestID10100 Member 0 2017-05-16
Report finished
This version ran on Edge on Windows 10

Development environment is Visual Studio Code

The run seems blazing fast, compared to the Web Browser Automation program.  The worker display is visible for about a second, before it finished an ID and goes on to the next.

(th)

Offline

#204 2022-12-15 20:17:10

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,422

Re: Java (r) or Javascript Computer Language

For SpaceNut re JavaScript initiative....

A member of the local Linux group has a Mac.  He was kind enough to test a recent version...

Good news, Tom...it looks like it worked on my MacOS running Ventura 13.1 and Safari 16.2.

    Program will click hidden button below after Fetch returns with data


    Worker Called by Setup: Run Status

    runReport: Progress detail is to be reported here
    Proposed Path is: Runtime
    whiteBoard: Temporary data goes here
    CurrentID: 12349
    StartID: 12348
    FinishID: 12348
    RetryCount: 00002
    Reporting from fx4_run after load event
    Input to Worker accepted
    Finished Processing! Current ID > FinishID
    This version ran on Edge on Windows 10

    Development environment is Visual Studio Code

The next Linux SIG meeting is next Tuesday .... hopefully they'll allocate a few minutes to whacking the proxy problem.

i'm hoping it will turn out to be easy to set up a local proxy to perform the needed service.

I set up SQUID (as we've discussed) but I have no idea what to do after that.

(th)

Offline

#205 2022-12-16 13:24:42

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,422

Re: Java (r) or Javascript Computer Language

For SpaceNut re JavaScript Initiative ...

The latest version of worker is 20221215 .... it is performing the item loop well, and delivering a concise report to the screen at the end of a run.

I just added a "removeItem" command so that data will be deleted from localStorage after it is retrieved for the End-of-Job report.  However, a data item was left over ... the program created a data item for a TestID one greater than the highest number requested.  I'll have to tweak the code a bit before offering it for your review.

A goal for today is to (at least try to) set up output to a file on the hard drive. That should not be difficult, because there are many examples, but I'm sure to find ways NOT to do things before the desired result shows up.

(th)

Offline

#206 2022-12-16 14:02:23

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,422

Re: Java (r) or Javascript Computer Language

For SpaceNut re JavaScript initiative ...

Rather than move on to writing a file, I decided to tweak the current Worker to clean up after itself, and NOT to leave an extra data item behind.

Here is a transcript of a test run:

JavaScript Worker Script for TestID Utility

Version 01 on 2022/12/16 Updates: Read URL - version reads/clears localStorage

Version information is saved at top of Script section

Verified: Integer Start: 12370 Integer End: 12380 Path: file:///C:/Runtime/runlog.txt

StartID
12370
EndID
12380


Program will click hidden button below after Fetch returns with data


Worker Called by Setup: Run Status

runReport: Progress detail is to be reported here
Proposed Path is: Runtime
whiteBoard: Temporary data goes here
CurrentID: 12380
StartID: 12370
FinishID: 12380
RetryCount: 00011
Reporting from fx4_run after load event
Input to Worker accepted
Finished Processing! Current ID > FinishID
Starting Report
Registered TestID12370 Member 0 2019-06-08
Registered TestID12371 Member 0 2018-02-08
Registered TestID12372 Member 0 2017-09-04
Registered TestID12373 Member 0 2017-09-03
Registered TestID12374 Member 0 2018-02-04
Registered TestID12375 Member 0 2018-02-15
Registered TestID12376 Member 0 2018-02-02
Registered TestID12377 Member 0 2017-04-09
Registered TestID12378 Member 0 2018-01-10
Registered TestID12379 Member 0 2020-08-25
Registered TestID12380 Member 0 2017-08-14
Report finished
This version ran on Edge on Windows 10

Development environment is Visual Studio Code

And here are the files for a test on your machine, if you have time this weekend.

https://www.dropbox.com/s/pnemvchyw15fh … r.htm?dl=0
https://www.dropbox.com/s/n18o5nj76k3r2 … p.htm?dl=0
https://www.dropbox.com/s/8kc0k2ujbpi5f … o.txt?dl=0

Procedure:
Copy files to Runtime folder ...
Use Proxy URL to request permission to use Demo Proxy server
Run Setup
***
localStorage should be empty of data after the report.

Update at 19:25 local time... The new Worker ran fine on Chromebook.
The range requested was 18000-18100.

(th)

Offline

#207 2022-12-16 18:52:30

SpaceNut
Administrator
From: New Hampshire
Registered: 2004-07-22
Posts: 29,433

Re: Java (r) or Javascript Computer Language

Have been really tired after eating supper and falling asleep from exhaustion but have been peeking in on the forum during breaks that I have in the days work schedule.

Offline

#208 2022-12-16 22:21:46

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,422

Re: Java (r) or Javascript Computer Language

For SpaceNut re #207 plus new item re proxy...

Thanks for stopping in to glance at this topic, despite the challenges of your job and other demands on your time!

The program is close to stable at this point!  I'm hoping to add file output tomorrow.

A member of the Linux SIG here came up with a suggestion for the proxy service that looks promising:

Privoxy is a piece of software which acts as a non-caching web proxy. A web proxy is a service that web browsers can use instead of connecting to web servers directly. The web browser then asks the proxy to request objects like web pages and images on their behalf and forwards the data back. Privoxy has advanced filtering capabilities which aim at:
linoxide.com/tools/install-use-privoxy-ubuntu-16-04/
How to Install and Use Privoxy on Ubuntu 16.04

I like the idea of the software being non-caching!  SQUID is designed to cache data, and I'm annoyed with the browser for all the caching it does, so welcome the possibility of a proxy that does NOT perform caching.

The next Linux SIG meeting here is next Tuesday. 

(th)

Offline

#209 2022-12-17 08:10:37

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,422

Re: Java (r) or Javascript Computer Language

For SpaceNut re JavaScript initiative ...

I was curious to know what will happen if an operator enters a range of TestID's that are not available...

Worker Called by Setup: Run Status

runReport: Progress detail is to be reported here
Proposed Path is: Runtime
whiteBoard: Temporary data goes here
CurrentID: 19010
StartID: 19000
FinishID: 19010
RetryCount: 00011
Reporting from fx4_run after load event
Input to Worker accepted
Finished Processing! Current ID > FinishID
Starting Report
Registered Your search returned no hits.
Pag
Registered Your search returned no hits.
etc...

No fuss! No muss!  no data so try the next ...

I hope you get some rest this weekend, and have a bit of time to run a test or two. 

(th)

Offline

#210 2022-12-17 08:38:06

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,422

Re: Java (r) or Javascript Computer Language

For SpaceNut re JavaScript initiative ...

I set up a test on the Chromebook, to look at 1000 TestID's

Registered TestID16998 Member 0 2018-10-21
Registered TestID16999 Member 0 2017-08-30
Registered TestID17000 Member 0 2017-10-06
Report finished
This version ran on Edge on Windows 10

Development environment is Visual Studio Code

The run took 651 seconds for 1000 TestID's .... pretty amazing ... on average, it took only .651 seconds per ID

(th)

Offline

#211 2022-12-17 14:34:09

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,422

Re: Java (r) or Javascript Computer Language

For SpaceNut re JavaScript initiative ...

After spending some time investigating the option of writing data to the hard drive from JavaScript, I've given up for today.

Output from the Worker version of 20221216 goes to the web window, and the contents of the web window can be collected with Select All/Copy All, and pasted to Notepad.

The issue(s) are the problem of hackers being able to write to a hard drive, and the various solutions I looked at (so far) seem not to be universal, and the ability to run this code anywhere is a requirement.

I'll keep looking, in case there is something I've missed.  That is ** highly ** likely.

In the mean time, the current version is working well, so I'll leave it alone.

(th)

Offline

#212 2022-12-17 15:53:38

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,422

Re: Java (r) or Javascript Computer Language

For SpaceNut re JavaScript initiative ....

Work on trying to write data to the hard drive revealed an error in Worker 20221216, so here is a corrected version:

https://www.dropbox.com/s/pnemvchyw15fh … r.htm?dl=0

Setup remains unchanged:
https://www.dropbox.com/s/n18o5nj76k3r2 … p.htm?dl=0

As usual, ask the Demo Proxy for permission to use their service:
https://www.dropbox.com/s/8kc0k2ujbpi5f … o.txt?dl=0

Procedure:
1) copy files to folder
2) run Setup
3) Enter range of numbers from 1 to 18375

If you want to feed the output into a spreadsheet, copy the web window and paste it into a utility program such as Notepad.

I'd be interested in seeing a histogram showing hacker registration by date.

Update next day:
Experiments with a spreadsheet showed that a simple two column data set would support a bar graph to show Scammer Registrations by year...

Year    Count
2005    1
2006    0
2007    0
2008    1
2009    ?
2010    ?
2011    ?
2012    ?
2013    ?
2014    ?
2015    ?
2016    ?
2017    ?
2018    ?
2019    ?
2020    0
total: 18375

(th)

Offline

#213 2022-12-18 20:50:38

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,422

Re: Java (r) or Javascript Computer Language

For SpaceNut ...

As reported earlier, the local Linux SIG has taken an interest in the JavaScript initiative.

The next monthly meeting is coming up Tuesday.

A few minutes ago I tried a local proxy called "privoxy" on an Ubuntu box.

The URL has to be changed in both Setup and Worker.

Apparently privoxy uses port 8118, which will be easier for me to remember than the one chosen for SQUID.

The results are encouraging ... Instead of producing a flood of errors as I've come to expect whenever I try something new, this time there was a long wait and then the browser reported a time out.

I've notified the Linux SIG representative of the message, in hopes we might be able to solve it next Tuesday evening.

(th)

Offline

#214 2022-12-19 12:14:19

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,422

Re: Java (r) or Javascript Computer Language

In planning for tomorrow evening's Linux SIG meeting, a member sent out this link:

https://www.avast.com/c-how-to-set-up-a-proxy

The article is embedded within advertisements for AVAST.  The content seems to be fairly generic.  It covers forward and reverse proxies.

It states that there are a number of forward proxies on the Internet, and indeed, the JavaScript dem site we are using during development is an example.

Our (or at least ** my ** ) goal is to find a proxy solution that runs easily and reliably on the same computer as the browser where JavaScript is going to run.

The article at the link above refers to setting up a proxy on the client PC, but concerns itself with configuring the browser to work with the proxy.

Update a bit later ... I confirmed that the default configuration file for privoxy listens to 127.0.0.1 Port 8118.

Then (following advice from Internet contributors) I configured Firefox to use the proxy at 127.0.0.1:8118, and the program seems to be working normally.

I have no way (at the moment) to know if traffic going through the proxy.

The problem remains ... the JavaScript request to send a message through the proxy is timing out.

Update a bit later ...

In further preparation for tomorrow's Linux SIG meeting, I installed privoxy on Windows 7 and modified Setup and Worker to use it.
I got the same time out error as I got in Ubuntu 22.04.

I use the Windows 7 for Zoom, because it does not crash when I set up Zoom share.
However, by intention, the JavaScript runs on any operating system, and in any (modern) browser.
Furthermore, privoxy is able to run in all major operating system environments.

Hopefully whatever the problem is will turn out to be simple to fix.  That does NOT mean it will be easy to solve.

(th)

Offline

#215 2022-12-20 20:41:26

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,422

Re: Java (r) or Javascript Computer Language

For SpaceNut re JavaScript privoxy discussion in Linux SIG meeting.

The meeting went past the normal closing time with a deep dive into Linux internals.  Thankfully two members stayed past closing to work with me on the Setup/Worker application, and specifically the privoxy proxy.

The first phase of the session was devoted to reproducing the error message I've been seeing on Ubuntu and Windows.

After that, we began study of the config file, and experimenting with options.

Finally, we uncommented the entire debug feature, and suddenly the logfile filled up with 41Kb of data.

At that point we agreed it's up to me to see what I can learn from all that data.

In clear text at the bottom of a lot of hex dump was a line to the effect that the client did not close the transmission properly.

I'm looking forward (with some hesitation) to the next phase of this process.

(th)

Offline

#216 2022-12-21 21:01:28

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,422

Re: Java (r) or Javascript Computer Language

Investigation of why privoxy is balking at sending javaScript messages is not turning up much so far.  The proxy is apparently working perfectly for this browser, which is located on a different PC than the proxy.  The Windows settings were changed to use the proxy, and performance is normal.  What I don't ** know ** right now is whether the browser traffic is actually going through the remote proxy, but the log file on the Ubuntu box ** should ** reveal if traffic's been passing through.

(th)

Offline

#217 2022-12-22 07:13:20

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,422

Re: Java (r) or Javascript Computer Language

This post offers a link to an interview with a member of Google's security team.

https://developer.chrome.com/blog/insider-dec-22/

The interview includes a bit of background on the team member, and discussion of ongoing security efforts at Google.

The obstacles placed in the path of the JavaScript initiative are part of a multi-year and multi-nation effort to defeat hackers in their ongoing and incessant attempts to spoil the Internet for everyone else.

(th)

Offline

#218 2022-12-22 21:09:36

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,422

Re: Java (r) or Javascript Computer Language

For SpaceNut ...

This post is designed for import to Excel....

The data is collected from the first 1000 Registrations of TestID's, as reported by the new Setup/Worker JavaScript application.

I would be interested in seeing a chart if you have time to make one.  My experiments came close to right, but the left side did not end up with the Year labels.

"Year","Count"
2005,1
2008,1
2017,639
2018,131
2019,54
2020,170

Save that little data set as a CSV file and import it to your Excel.

As soon as I figure out how to run a local proxy I'll collect more data.

(th)

Offline

#219 2022-12-23 10:36:40

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,422

Re: Java (r) or Javascript Computer Language

For SpaceNut re proxy investigation ....

The demo site we've been using may be specially designed to support JavaScript fetch ...

In pursuing the challenge of using privoxy, I took the suggestion of the Linux SIG members to try running the privoxy proxy on one machine, while testing from another.  This suggestion has several advantages, and I'm beginning to appreciate them.

The result of testing (and study of the debug logs) revealed a surprising (to me for sure) difference between the way that a browser (Edge in this case) was treated by the proxy, and how the request from JavaScript was treated.

In the activity log, the proxy shows the URL that the browser requested.  For example, NewMars shows up exactly as it appears on the Address bar before hitting Enter.  All the many other web sites requested by the browser show up in the log exactly as their names suggest.  I was astonished by the amount of web traffic going on under the surface.  Amazon was active, as were numerous other web sites I've visited in the past.  Apparently they've left triggers behind that "wake up" when i open the browser, and look to see if I want something.  This might well be related to the variety of ads that show up.

In any case (and the point of this report) ... The Edge browser obviously knows how to send a request to the proxy so that the proxy accepts the request.

In contrast, we have JavaScript, that transmits the URL without errors, but then twiddles it's little thumbs until a timeout occurs.

What's different?

The log file may well show the answer, but I'm looking right at it and ** I ** don't have a clue!

Instead of the log showing the request that was supposed to be transmitted to NewMars, it shows the address of the port.

The log entry looks like this:  http://123.123.123.123:8118

That is the address of the machine where privoxy is running.

The processing of all those browser requests shows that privoxy is working perfectly.

It sends the requests and routes the answer back to the browser with no discernible delay.

The format of the JavaScript URL looks like this (which you can see in both Setup and Worker in fx5_run)...

[address of hero demo server] / (slash) [address of newmars for TestID lookup[

I tried omitting the slash and immediately go a parsing error, although I don't know who generated the error. I assume it was the browser, but it might have been JavaScript.

I ** have ** to believe the Edge browser (and all browsers tested) are doing ** something ** different from the Hero example.

And ** that ** brings me back to the Hero demo program ... that program may well be processing incoming requests in a distinct way to assist their students.

It appears that the company is an education/consulting organization, and I am guessing they provide the demo site primarily for the benefit of their students.

There does NOT seem to be a contact pathway ... I get the impression they are happy to talk to you if you want to buy something.

They ** do ** offer a proxy service that handles CORS ... I assume there is a modest fee involved.

However, presumably privoxy can handle such requests, if the requests are packaged properly.

The privoxy program offers multiple debug options. The Linux SIG suggested activating all of them, and that certainly worked, but the result was a log file of nearly a gigabyte after only a few minutes of web traffic.

I cut back to just two of the many options, and that is how I discovered the curious behavior reported above.

The logical next step is to try to find a debug option that shows ** just ** the raw data coming over the wire from the machine where Setup/Worker are running.

In the mean time (if you've read this far) .... the most recent set of programs is available for you to test on your machine at your convenience.

If all goes well, and you select a range of TestID's to visit, you will see the Worker "blinking" as it processes each TestID, and then you will see a nicely formatted little report at the end.

In the post before this one, I showed you a set of numbers that came from one of the Setup/Worker runs.

I took the report, ran it through a process, and fed the resulting CSV file into a spreadsheet.

It is possible to generate a nice bar graph from the data, and I'm hoping you are inspired to show what such a plot might look like.

(th)

Offline

#220 2022-12-23 11:08:39

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,422

Re: Java (r) or Javascript Computer Language

For SpaceNut re Proxy communication ....

I asked Bing to try to find a discussion about the problem I reported in the post above.

It found a discussion that is similar enough, so that the answers provided by helpers revealed that there are two ways to set up traffic to a proxy....

The two ways are:

Relative (which I ** think ** the Hero demo site is using) (defined by use of a slash)

Absolute .... I have no idea (at this point) what that might be, but I ** did ** see a comment from a helper indicating that all browsers use absolute addressing

Here is a hand transcribed note from @user2284570 at StackOverflow ...
The absoluteURI form is REQUIRED when the request is being made to a proxy (RFC2616)

My (wild guess) is that the Hero demo proxy server is set up with relative addressing because it is so easy for a student .... just put a slash between parts.

It would appear that it will be necessary to find out what absolute addressing is and how to use it.

Good Grief!

(th)

Offline

#221 2022-12-23 14:57:45

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,422

Re: Java (r) or Javascript Computer Language

The purpose of ** this ** post is to show the resources that Google found to answer the question:

what is the difference between absolute and relative uri specification for web browser traffic to proxy

About 1,070,000 results (0.77 seconds)

The main difference between an absolute URL and a relative URL is this. A relative URL points to a file relative to the current directory or file, whereas an absolute URL is a complete address that leads to a file or resource.Dec 6, 2022

Difference between an Absolute URL and a Relative URLhttps://www.tutorialspoint.com › difference-between-an-a...

About featured snippets

Feedback
People also ask
What is the difference between an absolute and relative URL?
What is the difference between absolute and relative path in HTML?
What is the difference between an absolute and a relative link within an image tag?
What is an absolute URI?
Feedback

What Is the Difference Between a Relative and an Absolute ...https://www.seoclarity.net › resources › knowledgebase

Nov 25, 2019 — An absolute URL contains the entire address from the protocol (HTTPS) to the domain name (www.example.com) and includes the location within your ...

What Are Relative Urls? · Why Choose Relative Urls? · Why Choose Absolute Urls?

What's Best - Relative vs Absolute URLs for SEO? - Mozhttps://moz.com › The Moz Blog

Jun 5, 2015 — A relative URL is just /page. Basically what that does is it relies on your browser to understand, "Okay, this link is pointing to a page that's ...

What is the difference between an absolute and a relative URL?https://kb.iu.edu › abwp

Sep 8, 2021 — An absolute URL contains more information than a relative URL does. Relative URLs are more convenient because they are shorter and often more ...
Missing: specification traffic proxy

Absolute vs Relative URLs: when to use which for SEO?https://www.contentkingapp.com › ... › FAQ

Aug 5, 2021 — A relative URL is a URL that only includes the path. The path is everything that comes after the domain, including the directory and slug.
What Is An Absolute Url? · Canonical Urls: Absolute... · Hreflang Attribute: Absolute...

When is absoluteUri used from the http request specs?https://stackoverflow.com › questions › when-is-absolut...

Dec 4, 2016 — Difference between proxy server and reverse proxy server ... The absoluteURI form is only allowed when the request is being made to a proxy. The proxy is ...
3 answers

·

Top answer:
I think you might be confused about the type of proxy being discussed. It looks like the ...
Absolute vs relative URLs - Stack Overflow
Nov 15, 2011

Absolute urls, relative urls, and...? - Stack Overflow

Nov 7, 2011
c# - Determine if Absolute or Relative URL - Stack Overflow

May 10, 2017
Are protocol-relative URLs relative URLs? - uri - Stack Overflow

Mar 22, 2013
More results from stackoverflow.com

Relative/Absolute URL and Proxies - RBleughttps://regilero.github.io › english › apache › 2009/06/03

Jun 3, 2009 — First moving your app on a different domain will maybe be harder (especially if you're a bad coder and this absolute URL is not written once in ...

Modes of operation - mitmproxy docshttps://docs.mitmproxy.org › stable › concepts-modes

Configure your client to use mitmproxy by explicitly setting an HTTP proxy. ... In transparent mode, traffic is directed into a proxy at the network layer, ...

# Transparent Proxy · # Wireguard (transparent... · # Reverse Proxy


RFC 7252: The Constrained Application Protocol (CoAP)https://www.rfc-editor.org › rfc › rfc7252

by Z Shelby · 2014 · Cited by 2912 — This document is a product of the Internet Engineering Task Force (IETF). ... that translates between
different protocols, such as a CoAP-to- HTTP proxy or ...

draft-ietf-httpbis-p1-messaging-26https://datatracker.ietf.org › doc › html › draft-ietf-http...
26 · 1. origin-form The most common form of request-target is the origin-form. · 2. absolute-form When making a request to a proxy, other than a CONNECT or server ...

In scanning this list, I am coming away with the impression that understanding the difference between relative and absolute URI formation is key to solving the proxy timeout problem reported earlier in this topic.

(th)

Offline

#222 2022-12-23 22:08:58

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,422

Re: Java (r) or Javascript Computer Language

For SpaceNut ....

The relative vs absolute URL turns out NOT to be an issue in the failure of JavaScript to present an acceptable message to privoxy.

A relative URL (I gather) is for use internally at a given web site.  In fact, the Setup/Worker programs use a relative URL to call worker.htm.

The URL of worker is based upon the hard drive specification of a particular computer.

The URL of a remote site must include the name (or IP address) of the remote site.

I'll have to keep looking for an answer to the problem of timeout when JavaScript requests services from the proxy.

(th)

Offline

#223 2022-12-23 22:25:03

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,422

Re: Java (r) or Javascript Computer Language

For SpaceNut re proxy timeout ...

https://stackoverflow.com/questions/355 … oxy-script

This user advice looks pertinent ... I don't know how useful it is.
The format said to be malformed is exactly how the Heroku site wants the transmission.

However, the question mark looks useful ... it is the symbol that the url contains parameters

Plus, your URL http://proxyserver.com:3128/http://google.de is invalid and considered malformed URL.

To fix it you have to escape the other URL (with a query sting or so). e.g. $URL_in_PHP = "http://proxyserver.com:3128/?url=".urlencode('http://google.de');

var URL_in_javascript = "http://proxyserver.com:3128/?url="+encodeURI('http://google.de');

and tell your proxy server to navigate to$_GET['url']

Share
Improve this answer
Follow
answered Feb 24, 2016 at 6:54
Em Seven's user avatar
Em Seven
15511 gold badge11 silver badge1010 bronze badges
This is one of the php proxy scripts I mentioned. Don't work with Safari and with bugs on other browsers –

Kim Schaper
Feb 24, 2016 at 15:19
Add a comment

0


I solved it.

I used a nginx server with proxy_pass parameter

Share
Improve this answer

(th)

Offline

#224 2022-12-24 10:12:57

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,422

Re: Java (r) or Javascript Computer Language

For SpaceNut re JavaScript in general, and proxy use in this case...

While searching for advice (that I can understand) I ran across a discussion of a feature added to JavaScript that I had not heard of:

https://betterprogramming.pub/how-to-ru … ur-browser

How to Implement All This
I created a repo containing a service worker that’ll take care of all this. It contains a README with instruction and a demo page containing various use cases.

Hopefully this will encourage you to use the full powers of service workers, like caching, push notifications, and even making your website work offline.

Service workers are a tremendous addition to JavaScript and supported in all major browsers. There is no excuse not to use one in your app.

(th)

Offline

#225 2022-12-24 10:49:21

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 19,422

Re: Java (r) or Javascript Computer Language

For SpaceNut ...

privoxy appears to have started as a product with a different name in 1998.

The current version is actively supported, with email archives going back to 2016

7.2. History
A long time ago, there was the Internet Junkbuster, by Anonymous Coders and Junkbusters Corporation. This saved many users a lot of pain in the early days of web advertising and user tracking.

But the web, its protocols and standards, and with it, the techniques for forcing ads on users, give up autonomy over their browsing, and for tracking them, keeps evolving. Unfortunately, the Internet Junkbuster did not. Version 2.0.2, published in 1998, was the last official release, available from Junkbusters Corporation. Fortunately, it had been released under the GNU GPL, which allowed further development by others.

So Stefan Waldherr started maintaining an improved version of the software, to which eventually a number of people contributed patches. It could already replace banners with a transparent image, and had a first version of pop-up killing, but it was still very closely based on the original, with all its limitations, such as the lack of HTTP/1.1 support, flexible per-site configuration, or content modification. The last release from this effort was version 2.0.2-10, published in 2000.

Then, some developers picked up the thread, and started turning the software inside out, upside down, and then reassembled it, adding many new features along the way.

The result of this is Privoxy, whose first stable version, 3.0, was released August, 2002.

As of 2012 the Junkbusters Corporation's website (http://www.junkbusters.com/) has been shut down, but Privoxy is still actively maintained.

(th)

Offline

Board footer

Powered by FluxBB