MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MagicMirror server get info through proxy

    Scheduled Pinned Locked Moved Troubleshooting
    3 Posts 2 Posters 630 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L Offline
      lwvmobile
      last edited by

      Hello,

      Just curious if there was a way to get MagicMirror to retrieve information from servers from behind a proxy. I use a wireless hotspot/PDANet which uses an http/socks proxy to tunnel traffic through. For example, if I use chrome/chromium, I would use

      google-chrome --proxy-server=“socks5://192.168.49.1:8000”

      and I can get through just fine.

      So far, I have tried the following to see if any would work and allow a connection but have had no luck.

      #export http_proxy=http://192.168.49.1:8000/
      #export https_proxy=192.168.49.1:8000/
      #export http_proxy=socks5://192.168.49.1:8000
      #export https_proxy=socks5://192.168.49.1:8000
      cd MagicMirror
      #npm config set proxy socks5://192.168.49.1:8000
      #npm config set https-proxy socks5://192.168.49.1:8000
      npm config set proxy http://192.168.49.1:8000
      npm config set https-proxy http://192.168.49.1:8000
      npm run server
      

      and just get this output in the cosole when trying to connect though the proxy:

      [2020-11-16 07:36:07.059] [ERROR]  Calendar Error. Could not fetch calendar:  http://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics { Error: getaddrinfo EAI_AGAIN www.calendarlabs.com www.calendarlabs.com:80
          at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:56:26)
        errno: 'EAI_AGAIN',
        code: 'EAI_AGAIN',
        syscall: 'getaddrinfo',
        hostname: 'www.calendarlabs.com',
        host: 'www.calendarlabs.com',
        port: 80 }
      [2020-11-16 07:36:08.280] [ERROR]  fatal: unable to access 'https://github.com/MichMich/MagicMirror/': Could not resolve host: github.com
      
      [2020-11-16 07:36:08.284] [ERROR]  fatal: unable to access 'https://github.com/darickc/MMM-BackgroundSlideshow/': Could not resolve host: github.com
      
      [2020-11-16 07:36:08.290] [ERROR]  fatal: unable to access 'https://github.com/vincep5/MMM-DarkSkyRadar/': Could not resolve host: github.com
      
      [2020-11-16 07:36:08.294] [ERROR]  fatal: unable to access 'https://github.com/KirAsh4/calendar_monthly/': Could not resolve host: github.com
      

      If anybody has had any luck with anything similar, or any ideas, please let me know. Thanks.

      S 1 Reply Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @lwvmobile
        last edited by

        @lwvmobile maybe tsocks?

        https://www.binarytides.com/proxify-applications-with-tsocks-and-proxychains-on-ubuntu/

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        L 1 Reply Last reply Reply Quote 0
        • L Offline
          lwvmobile @sdetweil
          last edited by

          @sdetweil Sadly, no lock with tsocks or proxychains. I had already attempted proxychains, but I kept getting an error and crash when using that, and tsocks doesn’t crash, but I just get the same errors as above. Pretty sure I’ve got everything configured correctly otherwise in their respective conf files, and I’ve tried a few variations just to make sure.

          Proxychains:

          pi@PI-GW-3BPlus:~/MagicMirror $ proxychains npm run server
          ProxyChains-3.1 (http://proxychains.sf.net)
          
          > magicmirror@2.13.0 server /home/pi/MagicMirror
          > node ./serveronly
          
          [2020-11-16 08:25:40.797] [LOG]    Starting MagicMirror: v2.13.0
          [2020-11-16 08:25:40.819] [LOG]    Loading config ...
          [2020-11-16 08:25:40.829] [LOG]    Loading module helpers ...
          [2020-11-16 08:25:40.865] [LOG]    Initializing new module helper ...
          [2020-11-16 08:25:40.867] [LOG]    Module helper loaded: MMM-BackgroundSlideshow
          [2020-11-16 08:25:41.561] [LOG]    Initializing new module helper ...
          [2020-11-16 08:25:41.562] [LOG]    Module helper loaded: newsfeed
          [2020-11-16 08:25:41.639] [LOG]    Initializing new module helper ...
          [2020-11-16 08:25:41.640] [LOG]    Module helper loaded: updatenotification
          [2020-11-16 08:25:41.642] [LOG]    No helper found for module: clock.
          [2020-11-16 08:25:41.643] [LOG]    No helper found for module: calendar_monthly.
          [2020-11-16 08:25:41.894] [LOG]    Initializing new module helper ...
          [2020-11-16 08:25:41.895] [LOG]    Module helper loaded: calendar
          [2020-11-16 08:25:41.896] [LOG]    No helper found for module: currentweather.
          [2020-11-16 08:25:41.896] [LOG]    No helper found for module: weatherforecast.
          [2020-11-16 08:25:41.897] [LOG]    No helper found for module: MMM-DarkSkyRadar.
          [2020-11-16 08:25:41.898] [LOG]    All module helpers loaded.
          [2020-11-16 08:25:42.087] [LOG]    Starting server on port 8081 ... 
          [2020-11-16 08:25:42.111] [LOG]    Server started ...
          [2020-11-16 08:25:42.113] [LOG]    Connecting socket for: MMM-BackgroundSlideshow
          [2020-11-16 08:25:42.115] [LOG]    Connecting socket for: newsfeed
          [2020-11-16 08:25:42.116] [LOG]    Starting node helper for: newsfeed
          [2020-11-16 08:25:42.118] [LOG]    Connecting socket for: updatenotification
          [2020-11-16 08:25:42.119] [LOG]    Connecting socket for: calendar
          [2020-11-16 08:25:42.120] [LOG]    Starting node helper for: calendar
          [2020-11-16 08:25:42.121] [LOG]    Sockets connected & modules started ...
          [2020-11-16 08:25:42.122] [LOG]    
          Ready to go! Please point your browser to: http://192.168.7.1:8081
          [2020-11-16 08:25:46.112] [LOG]    Create new news fetcher for url: https://www.espn.com/espn/rss/ncf/news - Interval: 300000
          |DNS-request| www.espn.com 
          [2020-11-16 08:25:46.305] [LOG]    Create new calendar fetcher for url: http://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics - Interval: 300000
          [2020-11-16 08:25:46.321] [INFO]   Checking git for module: MMM-BackgroundSlideshow
          |DNS-response|: www.espn.com does not exist
          node: ../deps/uv/src/unix/getaddrinfo.c:93: uv__getaddrinfo_translate_error: Assertion `!"unknown EAI_* error code"' failed.
          Aborted
          npm ERR! code ELIFECYCLE
          npm ERR! errno 134
          npm ERR! magicmirror@2.13.0 server: `node ./serveronly`
          npm ERR! Exit status 134
          npm ERR! 
          npm ERR! Failed at the magicmirror@2.13.0 server script.
          npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
          
          npm ERR! A complete log of this run can be found in:
          npm ERR!     /home/pi/.npm/_logs/2020-11-16T13_25_46_466Z-debug.log
          

          Tsocks:

          pi@PI-GW-3BPlus:~/MagicMirror $ tsocks npm run server
          
          > magicmirror@2.13.0 server /home/pi/MagicMirror
          > node ./serveronly
          
          [2020-11-16 08:23:12.072] [LOG]    Starting MagicMirror: v2.13.0
          [2020-11-16 08:23:12.094] [LOG]    Loading config ...
          [2020-11-16 08:23:12.107] [LOG]    Loading module helpers ...
          [2020-11-16 08:23:12.145] [LOG]    Initializing new module helper ...
          [2020-11-16 08:23:12.147] [LOG]    Module helper loaded: MMM-BackgroundSlideshow
          [2020-11-16 08:23:12.823] [LOG]    Initializing new module helper ...
          [2020-11-16 08:23:12.824] [LOG]    Module helper loaded: newsfeed
          [2020-11-16 08:23:12.895] [LOG]    Initializing new module helper ...
          [2020-11-16 08:23:12.896] [LOG]    Module helper loaded: updatenotification
          [2020-11-16 08:23:12.899] [LOG]    No helper found for module: clock.
          [2020-11-16 08:23:12.900] [LOG]    No helper found for module: calendar_monthly.
          [2020-11-16 08:23:13.154] [LOG]    Initializing new module helper ...
          [2020-11-16 08:23:13.155] [LOG]    Module helper loaded: calendar
          [2020-11-16 08:23:13.156] [LOG]    No helper found for module: currentweather.
          [2020-11-16 08:23:13.157] [LOG]    No helper found for module: weatherforecast.
          [2020-11-16 08:23:13.158] [LOG]    No helper found for module: MMM-DarkSkyRadar.
          [2020-11-16 08:23:13.158] [LOG]    All module helpers loaded.
          [2020-11-16 08:23:13.349] [LOG]    Starting server on port 8081 ... 
          [2020-11-16 08:23:13.377] [LOG]    Server started ...
          [2020-11-16 08:23:13.380] [LOG]    Connecting socket for: MMM-BackgroundSlideshow
          [2020-11-16 08:23:13.381] [LOG]    Connecting socket for: newsfeed
          [2020-11-16 08:23:13.383] [LOG]    Starting node helper for: newsfeed
          [2020-11-16 08:23:13.384] [LOG]    Connecting socket for: updatenotification
          [2020-11-16 08:23:13.386] [LOG]    Connecting socket for: calendar
          [2020-11-16 08:23:13.387] [LOG]    Starting node helper for: calendar
          [2020-11-16 08:23:13.388] [LOG]    Sockets connected & modules started ...
          [2020-11-16 08:23:13.389] [LOG]    
          Ready to go! Please point your browser to: http://192.168.7.1:8081
          [2020-11-16 08:23:16.623] [LOG]    Create new news fetcher for url: https://www.espn.com/espn/rss/ncf/news - Interval: 300000
          [2020-11-16 08:23:16.823] [LOG]    Create new calendar fetcher for url: http://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics - Interval: 300000
          [2020-11-16 08:23:16.852] [ERROR]  Calendar Error. Could not fetch calendar:  http://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics { Error: getaddrinfo EAI_AGAIN www.calendarlabs.com www.calendarlabs.com:80
              at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:56:26)
            errno: 'EAI_AGAIN',
            code: 'EAI_AGAIN',
            syscall: 'getaddrinfo',
            hostname: 'www.calendarlabs.com',
            host: 'www.calendarlabs.com',
            port: 80 }
          [2020-11-16 08:23:16.901] [INFO]   Checking git for module: MMM-BackgroundSlideshow
          [2020-11-16 08:23:17.027] [INFO]   Checking git for module: calendar_monthly
          [2020-11-16 08:23:17.052] [INFO]   Checking git for module: MMM-DarkSkyRadar
          [2020-11-16 08:23:17.231] [ERROR]  fatal: unable to access 'https://github.com/KirAsh4/calendar_monthly/': Could not resolve host: github.com
          
          [2020-11-16 08:23:17.234] [ERROR]  fatal: unable to access 'https://github.com/vincep5/MMM-DarkSkyRadar/': Could not resolve host: github.com
          
          [2020-11-16 08:23:17.240] [ERROR]  fatal: unable to access 'https://github.com/darickc/MMM-BackgroundSlideshow/': Could not resolve host: github.com
          
          [2020-11-16 08:23:17.263] [ERROR]  fatal: unable to access 'https://github.com/MichMich/MagicMirror/': Could not resolve host: github.com
          
          ^C[2020-11-16 08:25:28.626] [LOG]    [SIGINT] Received. Shutting down server...
          [2020-11-16 08:25:28.629] [LOG]    Stopping module helper: MMM-BackgroundSlideshow
          [2020-11-16 08:25:28.630] [LOG]    Stopping module helper: newsfeed
          [2020-11-16 08:25:28.631] [LOG]    Stopping module helper: updatenotification
          [2020-11-16 08:25:28.632] [LOG]    Stopping module helper: calendar
          
          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • 1 / 1
          • First post
            Last post
          Enjoying MagicMirror? Please consider a donation!
          MagicMirror created by Michael Teeuw.
          Forum managed by Sam, technical setup by Karsten.
          This forum is using NodeBB as its core | Contributors
          Contact | Privacy Policy