Changeset 50
- Timestamp:
- 10/26/10 14:25:07 (13 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/README.Optimization.txt
r10 r50 75 75 3. Proxy configuration 76 76 ---------------------- 77 78 Always start from scratch with the auto-generated config. Do not add any options until you understand what they do and 79 you see an actual need from analyzing the logs. 77 80 78 81 To get a definitive overview of what the proxy does with each config value (and where it does it), you can start java … … 173 176 10-15 seconds (but avoid lower values) to minimize downtime due to shaky connections when there are few cards available. 174 177 Keep in mind that whenever a connection is lost one immediate retry is performed, so its usually best to leave this 175 at 30-60 seconds. 178 at 30-60 seconds. Setting too low may cause connectors to never reconnect. 176 179 177 180 <connection-manager> / <default-keepalive-interval> -
trunk/README.XmlUserManager.txt
r1 r50 26 26 - The url of the xml file with user definitions. The file should match the auth-config for SimpleUserManager, but 27 27 the top level element is ignored. See config/users.example.xml for an example. 28 Any url can be used, including https/ftp with user:passwd@hostname type auth info. File urls are also accepted. 28 Any url can be used, including https/ftp with user:passwd@hostname type auth info. 29 File urls are also accepted. NOTE: Relative file urls are written with no initial slashes, e.g: file:etc/users.xml 29 30 30 31 NOTE: When using a http/https url, it doesn't have to point to an actual static xml file. A php/jsp/asp page that -
trunk/README.txt
r46 r50 1 Cardservproxy 0.9.1 2 ------------------- 1 Cardservproxy 0.9.1 (See README.0.9.0.txt for features/changes specific to 0.9.x versions) 2 ------------------------------------------------------------------------------------------ 3 3 4 4 First, in order to avoid the usual confusion about the proxy: … … 93 93 94 94 - Define ca-profiles, one for each provider/vendor/card-type (yes if two providers happen to use the same ca-system, two 95 separate profiles are stillrequired). Ca-profiles can be thought of as virtual cardservers, and will seem to the95 separate profiles may still be required). Ca-profiles can be thought of as virtual cardservers, and will seem to the 96 96 clients like single cards (with a potentially infinite capacity). If you have an enigma1 services file (dreambox) 97 97 you can fetch that and place it where the proxy can read it and point it out in the profile definition. This will … … 102 102 only one port is required per profile (or two if you need both newcamd and radegast listeners), but it is now 103 103 possible to have an arbitrary number of listen ports for the same profile, complete with their own accept/deny lists 104 and other protocol-specific settings. 104 and other protocol-specific settings. If it is a satellite setup for mgcamd clients alone, you can create profiles 105 without ports and use the combined extended-newcamd listen port (top of the generated config) to access all profiles. 105 106 106 107 - Define cws-connectors for each cardserver that the proxy should connect to. Use one newcamd-connector or -
trunk/changelog.txt
r46 r50 2 2 ------------------------ 3 3 4 0.9.1 - RC0 4 0.9.1 - RC0 (see README.0.9.0.txt for conceptual changes and tips) 5 5 6 6 - Fixed: Handling for unknown sid (0 or a dummy sid listed in dummy-services) was broken in 0.9.0. 7 7 - Fixed: Incoming requests for dummy sids should not retain the dummy when forwarded, now changed to 0. 8 8 - Fixed: Per profile max-cw-wait could not be set below 1s (now both per profile and global allow down to 100 ms). 9 NOTE: While it may now be possible to configure such low values, whether it works or not below 1s is still undefined. 9 10 - Fixed: Probing was sometimes attempted even when there was only one candidate connector. 10 11 - Fixed: Radegast support updated to make sense with 0.9.x. 11 12 - Fixed: Emm handling for extended newcamd in systems with signifcant provider-idents. 13 - Fixed: Now possible to move messages between profiles from plugins, changes to networkid/caid were previously ignored. 12 14 - Changed: Two ecms (or dcw replies) with the same payload data but different dvb table ids (even/0x80 vs odd/0x81) are 13 15 now considered identical by the proxy. Implications unknown. -
trunk/src/com/bowman/cardserv/CardServProxy.java
r44 r50 363 363 return; 364 364 } 365 } else { // allow plugins to move messages to other profiles regardless of origin 366 profile = config.getProfileById(msg.getNetworkId(), msg.getCaId()); 367 if(profile == null) profile = session.getProfile(); 365 368 } 366 369 msg.setProfileName(profile.getName()); // just a lookup shortcut for all remaining processing -
trunk/src/com/bowman/cardserv/SidCacheLinker.java
r46 r50 183 183 sCmd = new StatusCommand("required-services", "List required services", "List services that need to be permanently in cache for the sid linker to work", false); 184 184 sCmd.register(this); 185 186 sCmd = new StatusCommand("linked-services", "List linked services", "List all services that have been configured for sid-cache-linking", false); 187 sCmd.register(this); 185 188 } catch (NoSuchMethodException e) { 186 189 e.printStackTrace(); … … 257 260 xb.appendElement("link").appendAttr("id", i + 1).endElement(false); 258 261 xb.appendElement("required"); 259 XmlHelper.xmlFormatServices(new TvService[] {services[i]}, xb, false, true, false, null, profiles);262 XmlHelper.xmlFormatServices(new TvService[] {services[i]}, xb, false, true, true, null, profiles); 260 263 xb.closeElement("required"); 261 264 xb.appendElement("opens"); 262 XmlHelper.xmlFormatServices((TvService[])opens.toArray(new TvService[opens.size()]), xb, false, true, false, null, profiles);265 XmlHelper.xmlFormatServices((TvService[])opens.toArray(new TvService[opens.size()]), xb, false, true, true, null, profiles); 263 266 xb.closeElement("opens"); 264 267 xb.closeElement("link"); … … 266 269 } 267 270 xb.closeElement("required-services"); 271 } 272 273 public void runStatusCmdLinkedServices(XmlStringBuffer xb, Map params, String user) { 274 String[] profiles = (String[])params.get("profiles"); 275 Set linkStrs = new TreeSet(); 276 Set set; int i = 0; 277 xb.appendElement("linked-services", "count", sidLinksMap.values().size()); 278 for(Iterator iter = sidLinksMap.values().iterator(); iter.hasNext(); ) { 279 set = (Set)iter.next(); 280 if(!linkStrs.contains(set.toString())) { 281 xb.appendElement("link").appendAttr("id", (i++) + 1).endElement(false); 282 XmlHelper.xmlFormatServices(toTvServiceArray(set), xb, false, true, true, null, profiles); 283 xb.closeElement("link"); 284 linkStrs.add(set.toString()); 285 } 286 } 287 xb.closeElement("linked-services"); 288 } 289 290 private TvService[] toTvServiceArray(Set set) { 291 TvService[] ts = new TvService[set.size()]; 292 SidEntry se; int i = 0; ServiceMapping sm; 293 for(Iterator iter = set.iterator(); iter.hasNext(); ) { 294 se = (SidEntry)iter.next(); 295 ts[i] = config.getService(se.profileName, se.serviceId); 296 sm = new ServiceMapping(se.serviceId, 0); 297 sm.setProviderIdent(ServiceMapping.NO_PROVIDER); 298 ts[i].setCustomData(sm.getCustomData()); 299 i++; 300 } 301 return ts; 268 302 } 269 303 … … 424 458 private void reportAddedService(CamdNetMessage req, CamdNetMessage origReq) { 425 459 String profileName = req.getProfileName(); 426 TvService ts1 = config.getService(profileName, origReq.getServiceId()); 460 TvService ts1 = config.getService(profileName, origReq.getServiceId()); 427 461 Set services = (Set)requiredServices.get(ts1); 428 462 if(services == null) services = new TreeSet(); … … 430 464 if(ts1.equals(ts2)) return; 431 465 services.add(ts2); 466 ServiceMapping sm = new ServiceMapping(req); 467 ts2.setCustomData(sm.getCustomData()); // make sure full custom data shows up in the status cmd xml views 468 ts1.setCustomData(new ServiceMapping(origReq).getCustomData()); 432 469 requiredServices.put(ts1, services); // required service -> all otherwise undecodable services that it unlocks 433 470 434 471 services = (Set)addedServices.get(profileName); 435 472 if(services == null) services = new TreeSet(); 436 if(services.add( new ServiceMapping(req))) {473 if(services.add(sm)) { 437 474 logger.info("Linked previously undecodable service: " + ts2 + " (unlocked by: " + ts1 + ")"); 438 475 // config.getConnManager().cwsFoundService(null, ts2); // todo
Note:
See TracChangeset
for help on using the changeset viewer.