• Python help...

    From paulie420@VERT/BEERS20 to All on Tue Sep 1 16:43:00 2020
    I am working on a Raspberry Pi Zero project. Using a 1941 Phil
    co Predictatelevision, that I fully refurbished, I want to c
    reate some python code toplay a random video with a digital
    touch sensor module.The digital touch sensory module
    is a bit different from a push button,because you can set it
    by some wood or small metal area and push a 'button'that do
    esn't appear to be there. Thats important, because I don't want to
    modify this antique in any way...Ok, so anyway... I have pyth
    on randomizing the files... I have it usingomxplayer to play
    a video... but then python/the linux box just sits therewit
    h the video player - not waiting for the next button press until the
    videois completely over. I thought I could u
    se subprocess.Popen instead of os.system, but I haven'tfigur
    ed out if that it true - nor the correct syntax to doso.
    Anyone wanna look at my code and see if they can help? Again, the s
    etup is Raspberry Pi Zero holds videos... I want the pythons
    cript to wait for a button (digtal input device) press, play a random
    videoand then play another random video if I press the butt
    on again. (I know, too,that I'll have to put some kill proce
    ss code in there... but I figured I'dget to that after I fig
    ured out how to wait for next button press prior tovideo end
    ing...) Heres my current code:-----fro
    m gpiozero import DigitalInputDevicefrom time import sleep
    import osimport randomimport subprocessbutton
    = DigitalInputDevice(21)while True:# Setup Ran
    don VideosvideoPath = "/home/pi/Videos/"vide
    oList = os.listdir(videoPath)random.shuffle(videoList)
    for video in videoList:target = os.path.join(videoPath, vide
    o)# Wait for button pressprint("Waiting for butt
    on press to start video.")button.wait_for_active()
    os.system('omxplayer --aspect-mode stretch "{}" >/dev/null'.form at(target))#subprocess.Popen('omxplayer --acpect-mode
    stretch "{}" >/dev/null'.format(target))#The
    subprocess was my idea that would let python continue listening... b
    ut #didnt work YET. The os.system does play a video... just
    waits there before#listening again for a button press.
    -----pAULIE42o...
    ......

  • From Tracker1@VERT/TRN to paulie420 on Wed Sep 2 12:21:00 2020
    On 9/1/2020 9:43 AM, paulie420 wrote:
    I am working on a Raspberry Pi Zero project. Using a 1941 Phil
    ....

    Not sure what editor you're using... but all the ANSi code intermingled
    makes it nearly impossible to actually read through on a non-terminal.

    --
    Michael J. Ryan
    tracker1 +o Roughneck BBS

    ---
    ■ Synchronet ■ Roughneck BBS - coming back 2/2/20
  • From paulie420@VERT/BEERS20 to Tracker1 on Wed Sep 2 22:40:00 2020
    Not sure what editor you're using... but all the ANSi code intermingled makes it nearly impossible to actually read through on a non-terminal.


    Thank you - I switched to Mystic, and I bet the QWK isn't setup correctly. I will get on it... sorry for any posts that have looked stupid. UGH.



    |07p|15AULIE|1142|07o
    |08.........
  • From Digital Man@VERT to paulie420 on Thu Sep 3 12:22:04 2020
    Re: Re: Python help...
    By: paulie420 to Tracker1 on Wed Sep 02 2020 10:40 pm

    Not sure what editor you're using... but all the ANSi code intermingled makes it nearly impossible to actually read through on a non-terminal.


    Thank you - I switched to Mystic, and I bet the QWK isn't setup correctly. I will get on it... sorry for any posts that have looked stupid. UGH.



    |07p|15AULIE|1142|07o
    |08.........

    And this message didn't have a QWKnet tagline.

    digital man

    Synchronet/BBS Terminology Definition #42:
    IMAP = Internet Message Access Protocol
    Norco, CA WX: 87.5°F, 43.0% humidity, 5 mph NE wind, 0.00 inches rain/24hrs

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From MRO@VERT/BBSESINF to paulie420 on Thu Sep 3 19:43:10 2020
    Re: Re: Python help...
    By: paulie420 to Tracker1 on Wed Sep 02 2020 10:40 pm

    Thank you - I switched to Mystic


    Sorry for your loss.
    ---
    ■ Synchronet ■ ::: BBSES.info - free BBS services :::
  • From paulie420@VERT/BEERS20 to MRO on Sun Sep 6 13:43:00 2020
    Re: Re: Python help...
    By: paulie420 to Tracker1 on Wed Sep 02 2020 10:40 pm

    Thank you - I switched to Mystic



    Sorry for your loss.

    I'm still running Sync!! But have a mystic... however, I guess I need to fix
    my QWK so I'm trying not to make a bunch of posts... my messages dont have a QWK tagline.



    |07p|15AULIE|1142|07o
    |08.........
  • From Denn@VERT/OUTWEST to MRO on Tue Sep 8 23:09:44 2020
    Re: Re: Python help...
    By: MRO to paulie420 on Thu Sep 03 2020 07:43 pm

    Thank you - I switched to Mystic


    Sorry for your loss.

    :) Wonder why he switched when he can run both like I do?

    ... Eat a bat and the whole world eats with you -covid-19

    ---
    ■ Synchronet ■ outwestbbs.com - the Outwest BBS
  • From Vk3jed@VERT/FREEWAY to Denn on Wed Sep 9 18:49:00 2020
    On 09-08-20 23:09, Denn wrote to MRO <=-

    :) Wonder why he switched when he can run both like I do?

    As do I. :)


    ... A hunch is creativity trying to tell you something.
    --- MultiMail/Win v0.51
    ■ Synchronet ■ Freeway BBS, Bendigo Australia. freeway.apana.org.au
  • From paulie420@VERT/BEERS20 to Denn on Wed Sep 9 13:01:00 2020
    On 08 Sep 2020, Denn said the following...

    Re: Re: Python help...
    By: MRO to paulie420 on Thu Sep 03 2020 07:43 pm
    Thank you - I switched to Mystic
    Sorry for your loss.
    :) Wonder why he switched when he can run both like I do?

    I do run both; American Pi is @ AmericanPiBBS.com and 20 For Beers is @ 20ForBeers.com:1337 ...

    Guess I should have stated such; point was that I must have the QWK settings messed up for the Mystic BBS cause Digital Man says I was missing a QWK tag line or kludge line... and another poster said my messages had tons of extra character garbage.

    So I have been trying not to post much - and need to go iron that out so my Mystic BBS posted posts come thru normal. :/



    |07p|15AULIE|1142|07o
    |08.........
  • From poindexter FORTRAN@VERT/REALITY to paulie420 on Thu Sep 10 10:09:00 2020
    paulie420 wrote to Denn <=-

    I do run both; American Pi is @ AmericanPiBBS.com and 20 For Beers is @ 20ForBeers.com:1337 ...

    I've been doing a lot of work with NGINX and reverse proxying
    HTTP/HTTPS. If there were a way to reverse proxy SSH, I'd love it -
    throw a ton of different BBSes behind a proxy and sort them out by
    hostname.



    ... If you have a rotary phone, please press 1 now.
    --- MultiMail/XT v0.52
    ■ Synchronet ■ realitycheckBBS -- http://realitycheckBBS.org
  • From echicken@VERT/ECBBS to poindexter FORTRAN on Fri Sep 11 00:34:11 2020
    Re: Re: Python help...
    By: poindexter FORTRAN to paulie420 on Thu Sep 10 2020 10:09:00

    I've been doing a lot of work with NGINX and reverse proxying
    HTTP/HTTPS. If there were a way to reverse proxy SSH, I'd love it -
    throw a ton of different BBSes behind a proxy and sort them out by hostname.

    Nothing so easy as inspecting a Host header and making it all totally seamless for the user, as far as I know.

    I'm vaguely imagining a custom SSH server which is used for encryption but not authentication. The user connects with eg. 'target_bbs@multi.bbs.host', no password required. The server knows what 'target_bbs' is and proxies between it and the client. From there, as far as the user is concerned, their BBS session flows as it would've done had they telnetted in.

    The 'server' in the above scenario could be a small piece of custom software (which I think would be easy to write). Or Synchronet could do that job in a slightly hacky way (some special user accounts, a hack of the logon script, and telgate).

    Actually authenticating the user via SSH and then handing them off to the target BBS without requiring additional login would depend on capabilities of the target software. I suspect this would be inconsistent and annoying.

    Anyway, just some musings.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com
    ■ Synchronet ■ electronic chicken bbs - bbs.electronicchicken.com
  • From Arelor@VERT/PALANT to poindexter FORTRAN on Fri Sep 11 02:50:46 2020
    Re: Re: Python help...
    By: poindexter FORTRAN to paulie420 on Thu Sep 10 2020 10:09 am

    paulie420 wrote to Denn <=-

    I do run both; American Pi is @ AmericanPiBBS.com and 20 For Beers is @ 20ForBeers.com:1337 ...

    I've been doing a lot of work with NGINX and reverse proxying
    HTTP/HTTPS. If there were a way to reverse proxy SSH, I'd love it -
    throw a ton of different BBSes behind a proxy and sort them out by
    hostname.



    ... If you have a rotary phone, please press 1 now.

    You can probably do that with stock software already.

    Create a user account in your proxy machine for every BBS you want to reverse proxy for. Then configure such user to be capable of connecting to each target BBS onlñy. This way if the client does synchronetclone@proxymachine.org, user "synchronetclone" is called up and inmediatelly connects to the "SinchronetClone" BBS.

    It is not exactly transparent, I know.

    I have looked into OpenBSD's relayd but it does not look like it has that function.

    --
    gopher://gopher.operationalsecurity.es

    ---
    ■ Synchronet ■ Palantir BBS * palantirbbs.ddns.net * Pensacola, FL
  • From DaiTengu@VERT/ENSEMBLE to poindexter FORTRAN on Sun Sep 13 01:05:23 2020
    Re: Re: Python help...
    By: poindexter FORTRAN to paulie420 on Thu Sep 10 2020 10:09 am

    I've been doing a lot of work with NGINX and reverse proxying
    HTTP/HTTPS. If there were a way to reverse proxy SSH, I'd love it -
    throw a ton of different BBSes behind a proxy and sort them out by hostname.


    Unfortunately that's not possible. You can proxy TCP traffic, but nginx can't terminate the encryption for SSH, nor can HAProxy, fabio, or any other reverse proxy system.

    I just set up a reverse NGINX proxy on a dual-64 core EPYC (7742) server this week. We had it handling about 70,000 SSL connections per second (real world traffic) while only running around 45% CPU usage, with SMT (AMD's version of hyperthreading) turned off.

    at that point we ran out of SSL traffic to throw at it.

    DaiTengu

    ... No good deed goes unpunished.

    ---
    ■ Synchronet ■ War Ensemble BBS - The sport is war, total war - warensemble.com
  • From Nelgin@VERT/EOTLBBS to paulie420 on Wed Sep 16 16:09:35 2020
    paulie420 wrote:
    ^[[0m^[[1;1H^[[1mI am working on a Raspberry Pi Zero project. Using a 1941 Phil
    ^[[A^[[62Cco Predicta^[[B^[[73Dtelevision, that I fully refurbished, I want to c
    ^[[A^[[49Create some python code to^[[B^[[74Dplay a random video with a digital

    ...que?

    ---
    ■ Synchronet ■ End Of The Line BBS - endofthelinebbs.com
  • From Tracker1@VERT/TRN to poindexter FORTRAN on Mon Sep 21 15:43:11 2020
    On 9/10/2020 10:09 AM, poindexter FORTRAN wrote:
    I do run both; American Pi is @ AmericanPiBBS.com and 20 For Beers is @ 20ForBeers.com:1337 ...

    I've been doing a lot of work with NGINX and reverse proxying
    HTTP/HTTPS. If there were a way to reverse proxy SSH, I'd love it -
    throw a ton of different BBSes behind a proxy and sort them out by
    hostname.

    Probably could with client keys and credential forwarding... you can
    also do a reverse proxy over a websocket, but that would something on
    the client to handle that aspect.

    Would love it if syncterm supported wss+PROT and/or ws+PROT so you could
    do rlogin/telnet/ssh over a websocket connection. Of course that messes
    with the IP detected on the backing server/service.

    --
    Michael J. Ryan
    tracker1 +o Roughneck BBS

    ---
    ■ Synchronet ■ Roughneck BBS - coming back 2/2/20
  • From Tracker1@VERT/TRN to DaiTengu on Mon Sep 21 15:46:25 2020
    On 9/12/2020 11:05 PM, DaiTengu wrote:

    I just set up a reverse NGINX proxy on a dual-64 core EPYC (7742) server this week. We had it handling about 70,000 SSL connections per second (real world traffic) while only running around 45% CPU usage, with SMT (AMD's version of hyperthreading) turned off.

    at that point we ran out of SSL traffic to throw at it.

    If all it does is reverse-proxy, may also want to take a look at Caddy
    v2, and see if you get more throughput.

    --
    Michael J. Ryan
    tracker1 +o Roughneck BBS

    ---
    ■ Synchronet ■ Roughneck BBS - coming back 2/2/20
  • From DaiTengu@VERT/ENSEMBLE to Tracker1 on Thu Sep 24 11:36:08 2020
    Re: Re: Python help...
    By: Tracker1 to DaiTengu on Mon Sep 21 2020 03:46 pm

    I just set up a reverse NGINX proxy on a dual-64 core EPYC (7742)
    server this week. We had it handling about 70,000 SSL connections per
    second (real world traffic) while only running around 45% CPU usage,
    with SMT (AMD's version of hyperthreading) turned off.

    at that point we ran out of SSL traffic to throw at it.

    If all it does is reverse-proxy, may also want to take a look at Caddy v2, and see if you get more throughput.

    We use some nginx modules as well. I'd have to dig through Caddy and see if there's anything similar.

    I'm more worried about the Linux kernel limitations than anything else.

    I guess we'll see how it goes! :)

    DaiTengu

    ... Everything beautiful has its moment and then passes away.

    ---
    ■ Synchronet ■ War Ensemble BBS - The sport is war, total war - warensemble.com