Giter Site home page Giter Site logo

common-proxies's People

Contributors

craeckie avatar dependabot[bot] avatar harharlinks avatar karmanyaahm avatar moffatman avatar p1gp1g avatar squatica avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

common-proxies's Issues

TODO: Docs

todo list for myself
Document:

  • User Agent
  • Multi-Host
  • Write a little explainer of splitting

Don't enable matrix by default

Matrix is enabled by default, I'd expect everything to be disabled by default and then I only need to enable the stuff I actually want to run. Right now I have to manually disable matrix.

Better defaults for debugging

  • The default port could be changed to something > 1024
  • The requirement for a config file to exist could be removed, especially since everything is environment variables now

User Agent

To be able to identify in push providers

Also optionally sending the server hostname might further help for big server debugging

Question: does this project can handle web push notification for any web application ?

This may sound like a stupid question:
I want to remove my dependency to google Firebase and then run a degooglised android phone. However I couldn't anymore subscribe to push notification of web apps as phenix (firefox android) have no alternative to google firebase yet.

I wanted to know if it is possible either to have a web push->unifiedpush bridge that I could run on a homeserver to subscribe to web push notifications for me and relay on unifiedpush provider like ntfy.sh.

So, my question is, can this proxy handle this goal and make me able to receive web push notification of a website (that I couldn't change the backend to support UP out of the box) with UP provider like ntfy.sh android app ?

Thank you for your help

FCM Distributors rewrite proxy

ATM it is done with the following nginx + lua rule :

server {
   listen 127.0.0.1:1234;
   location / {
       access_by_lua_block{
           local json=require("cjson")
           ngx.req.read_body()
           local args = ngx.req.get_uri_args()
           local token = args["token"]
           local app = args["app"]
           local req = ngx.req.get_body_data()
           local newreq =  { ["to"] = token, ["data"] = { ["body"] = req, ["app"] = app } }
           local body = json.encode(newreq)
           ngx.req.set_body_data(body)
       }

       proxy_set_header         Authorization key=AAAAB<redaced> ;
       proxy_set_header         Content-Type application/json;
       proxy_pass                       https://fcm.googleapis.com/fcm/send;
       proxy_set_header            Host fcm.googleapis.com;

       # Force https
       #if ($scheme = http) {
       #    rewrite ^ https://$server_name$request_uri? permanent;
       # }
   }
 }

We need to make a /v2 endpoint that base64 encodes the request to follow AND_2.0.0 and keeping this one for the old one. It will be easier to do it with common-proxies

Internal DNS server

I run an internal DNS for services (e.g. gotify) which are also externally available.
I think Paranoidhttp prevents the proxy to connect to my gotify instance, as the internal DNS resolves the domain to my internal ip address.
The logs show following error:

panic:
Post "https://push.example.com/UP?token=asdbc1234": bad ip is detected: 192.168.0.10

Is there any way to tell paranoidHttp to allow localhost?

I'm not a go programmer, so pardon my ignorance - but I have everything running on my internal network - no outside IP addresses are used, and the rewriter here is the only thing that appears to work properly with my matrix install - pure proxying with nginx does not work right for me. All clients operate on the network directly or via VPN.

Looking at the docs for paranoidhttp, it does seem to exemplify on the main readme how to allow 127.0.0.1 - which is what I'd love to be able to do...

In my testing, other than having up-rewrite-linux-amd64 reject the IP, everything else is working.

Thank you!

Download of release v1.5.0 failed

I get

curl -O up-rewrite-linux-amd64 https://github.com/UnifiedPush/common-proxies/releases/download/v1.5.0/up-rewrite-linux-amd64
curl: Remote file name has no length!
curl: (23) Failed writing received data to disk/application

and only a "Failed Download" in Firefox, when i try to download the latest release.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.