web-push
web-push copied to clipboard
Add Proxy test to test/testSendNotification.js
Follow-up to #319.
hello @marco-c is this issue still open?
Yes.
ok @marco-c then what needs to be done in this bug?
https://github.com/web-push-libs/web-push/pull/319#issuecomment-376918058
Can I work on this!
Yes. Anyone can work on any open issue which is not assigned and which has no PR open linked to it.
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 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.
サンキュー
Hi,i am working on this issue.
@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 yes, you should create a PR on this repo.
@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
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 I have created a PR. Is there anything else I need to do before it is reviewed?
i want to contribute to this
Feel free.
plz anyone can guide me about the project
@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 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
No, this project is in JavaScript.
I want to know that in China, fcm is block, web-push can work right? Is anyone used in you project ?
Yes, it can work via a proxy.
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?
@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
@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 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 were you able to fix your issue? If not then can I work on it? @marco-c
HI @anandhkishan,
Is this still open ? If yes, can I contribute ?
Best, Akash