"flashphoner.properties" have "allow_domains" property

Jung

New Member
i can't find for solution about this setting
i want to block to some domains
"flashphoner.properties" have "allow_domains" property
but if i was set to it
i can't play video in client player
this is my sever's error messages

05:00:39,941 ERROR HandlerUtils - API-ASYNC-pool-23-thread-4 Failed to invoke method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.flashphoner.server.client.handler.HandlerUtils.lambda$processThroughREST$0(Unknown Source)
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760)
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:736)
at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:442)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
at com.flashphoner.server.client.handler.wcs4.WCS4Handler.connection(Unknown Source)
at com.flashphoner.server.client.handler.DelegateHandler.connection(Unknown Source)
... 11 more

help me plz
 
Last edited:

Max

Administrator
Staff member
Hello
You can block domains by field 'origin'
Example:
Code:
URL:http://localhost:9091/EchoApp/connect
OBJECT:
{
  "nodeId" : "ah20GKYnbYKxjJmdh1zDs6cllWkn0Q0t@46.101.108.90",
  "appKey" : "defaultApp",
  "sessionId" : "/81.25.47.58:55973/46.101.108.90:8443",
  "useWsTunnel" : false,
  "useWsTunnelPacketization2" : false,
  "useBase64BinaryEncoding" : false,
  "mediaProviders" : [ "WebRTC", "MSE", "WSPlayer" ],
  "clientVersion" : "0.5.28",
  "clientOSVersion" : "5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36",
  "clientBrowserVersion" : "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36",
  "origin" : "https://wcs5-eu.flashphoner.com:8888"
}
To block by domain you have to return HTTP 403 Forbidden on /connect hook
Here you can read more about REST methods (hooks)
https://flashphoner.com/docs/wcs5/wcs_docs/html/en/wcs-rest-methods/
https://flashphoner.com/docs/wcs5/w.../index.html?method_connect_authentication.htm
 

Jung

New Member
hi Max. thanks for your feedback

sorry i can't understand your answer

i did referens from Web Call Server 5 - Admin Guide
URL IS
https://flashphoner.com/docs/wcs5/w...f_directory-flashphoner_properties_config.htm

here have to about "flashphoner.properties" config

Misc line have "allow_domains"
and description is "If set, then WebSocket connections from these domains only will be allowed."

so i did set to my FlashphonerWebCallServer's "flashphoner.properties"
like this "allow_domains =http://mydomain.com" in my FlashphonerWebCallServer's flashphoner.properties

but if i was add that and server restart FlashphonerWebCallServer
my server get that exception and demo page can't play to video

allow_domains property can't use? or if i'm wrong
how to set "allow_domains" property in flashphoner.properties

help me plz..
 
Last edited:

Max

Administrator
Staff member
Hello
As you can see
https://flashphoner.com/docs/wcs5/w...f_directory-flashphoner_properties_config.htm
Outdated or invalid setting are highlighted in grey. They were used in previous versions. These settings will be probably deleted in further WCS updates.
So allow_domains setting is deprecated and won't work.

Please read my post above
https://forum.flashphoner.com/threa...have-allow_domains-property.11441/#post-16183
You have to implement a REST hook to authorize users by domain.
 
Top