web-push icon indicating copy to clipboard operation
web-push copied to clipboard

Add Proxy test to test/testSendNotification.js

Open marco-c opened this issue 7 years ago • 29 comments
trafficstars

Follow-up to #319.

marco-c avatar Mar 28 '18 15:03 marco-c

hello @marco-c is this issue still open?

vipulchhabra99 avatar Feb 09 '19 03:02 vipulchhabra99

Yes.

marco-c avatar Feb 09 '19 14:02 marco-c

ok @marco-c then what needs to be done in this bug?

vipulchhabra99 avatar Feb 11 '19 16:02 vipulchhabra99

https://github.com/web-push-libs/web-push/pull/319#issuecomment-376918058

marco-c avatar Feb 11 '19 18:02 marco-c

Can I work on this!

sudipt1999 avatar Mar 07 '19 16:03 sudipt1999

Yes. Anyone can work on any open issue which is not assigned and which has no PR open linked to it.

marco-c avatar Mar 07 '19 17:03 marco-c

Hi, is there anymore documentation on this other than the comment referred to above? I am new to the community and I would like to work on this but I can't really see any description of what exactly should be done.

amrrsharaff avatar Oct 23 '19 18:10 amrrsharaff

@amrrsharaff the issue is pretty self explanatory: a test for the "proxy" option, option which was implemented in #319, needs to be added in test/testSendNotification.js.

marco-c avatar Oct 23 '19 19:10 marco-c

サンキュー

acou06281213 avatar Feb 18 '20 13:02 acou06281213

Hi,i am working on this issue.

StarWonder67 avatar Mar 01 '20 12:03 StarWonder67

@marco-c I am new to FOSS. I have forked this repo and created a PR on my local repository. Should I create a PR to the original repository? Will be obliged if you could review it once.

StarWonder67 avatar Mar 03 '20 04:03 StarWonder67

@StarWonder67 yes, you should create a PR on this repo.

marco-c avatar Mar 03 '20 10:03 marco-c

@marco-c I have tried numerous methods but I can't seem to create a PR to this repo. The authentication is failing. Although I have created a PR on my local repo. Here's the link: https://github.com/StarWonder67/web-push/pulls

StarWonder67 avatar Mar 05 '20 17:03 StarWonder67

The PR on your repo can't be used to merge code on this repo, you will have to create a PR on this repo. You don't need to authenticate other than logging-in on GitHub. You can create a PR on this repo from https://github.com/web-push-libs/web-push/compare.

marco-c avatar Mar 05 '20 18:03 marco-c

@marco-c I have created a PR. Is there anything else I need to do before it is reviewed?

StarWonder67 avatar Mar 06 '20 06:03 StarWonder67

i want to contribute to this

tarun-singla655 avatar May 21 '20 11:05 tarun-singla655

Feel free.

marco-c avatar May 21 '20 11:05 marco-c

plz anyone can guide me about the project

Rahul-3000 avatar Jul 04 '20 05:07 Rahul-3000

@Rahul-3000 if you have specific questions, feel free to ask. For this issue, what needs to be done is: a test for the "proxy" option, option which was implemented in #319, needs to be added in test/testSendNotification.js.

marco-c avatar Jul 04 '20 11:07 marco-c

@marco-c I don't know javascript I m a beginner n I know Python, Cpp, C and web development Is there any work related to them

Rahul-3000 avatar Jul 04 '20 14:07 Rahul-3000

No, this project is in JavaScript.

marco-c avatar Jul 06 '20 08:07 marco-c

I want to know that in China, fcm is block, web-push can work right? Is anyone used in you project ?

Hotcapsicum avatar Aug 05 '20 07:08 Hotcapsicum

Yes, it can work via a proxy.

marco-c avatar Aug 05 '20 23:08 marco-c

Yes, it can work via a proxy. Thanks for reply, this question has bothered me for a month. let payload = { title: 'dmd', body: 'subscrib success', data: {url: 'https://www.sina.com'} } const options = { gcmAPIKey: FCM_KEY, vapidDetails: { subject: 'mailto:[email protected]', publicKey: vapidKeys.publicKey, privateKey: vapidKeys.privateKey }, timeout: 8000, TTL: 8000, headers: { 'Topic': 'value', 'Accept': 'application/json', 'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*' }, proxy: '127.0.0.1:3000' } webpush.sendNotification(pushSubscription, JSON.stringify(payload), options);

this is my code in node.js , but I can't receive push message in my chrome. Is there some question in my code?

Hotcapsicum avatar Aug 06 '20 02:08 Hotcapsicum

@marco-c will it be sufficient if we could test validRequests and invalidRequests with extraOptions being {'proxy':'proxy'} ? else how could we assert the proxy set in the method since webPush.sendNotification returns a promise with response details

anandhkishan avatar Oct 05 '20 15:10 anandhkishan

@marco-c will it be sufficient if we could test validRequests and invalidRequests with extraOptions being {'proxy':'proxy'} ?

@anandhkishan this could be a first step.

else how could we assert the proxy set in the method since webPush.sendNotification returns a promise with response details

We can run a "fake" proxy as part of the test and asser that the request hit the proxy.

marco-c avatar Oct 07 '20 00:10 marco-c

@marco-c I tried this and created a proxy server as part of the test. But the proxy server is either giving DEPTH_ZERO_SELF_SIGNED_CERT error when using same pem file as in existing server or If I dont use the cert key, its giving out sslv3 alert handshake failure. I have raised an WIP PR. Please help me out in this part. PR: https://github.com/web-push-libs/web-push/pull/627

anandhkishan avatar Oct 11 '20 17:10 anandhkishan

@anandhkishan were you able to fix your issue? If not then can I work on it? @marco-c

jalajcodes avatar Jan 12 '21 08:01 jalajcodes

HI @anandhkishan,

Is this still open ? If yes, can I contribute ?

Best, Akash

khiller7 avatar May 30 '21 10:05 khiller7