我一直在挖這一點,並找到如下:
- 過濾器PC1和RSA只加密通信,並將 保護通過在第三部分的侵擾通信 網絡。 Zip只是壓縮。
- 訪問執行方法由datasnap中的角色控制。
- 訪問datasetproviders,如果導出,不受任何保護......?!?!
- 名稱以AS_開頭的服務器方法被隱藏,代理生成器不包含在代理客戶端類中。
- 以AS_開頭的數據集提供程序也被公開。
- [$ METHODINFO ON]對代理生成器沒有影響,可能只能由RTTI使用。
下面是一個例子ServerMethods類(摹我希望這次的編輯將格式化好)
`
type
TServerMethods1 = class(TDSServerModule)
Sqlserver1ad4Connection: TFDConnection;
Tree_alarmsTable: TFDQuery;
Tree_calllistsTable: TFDQuery;
Tree_contactsTable: TFDQuery;
dspAlarms: TDataSetProvider; // exported and accessable in proxy client
dspCalllists: TDataSetProvider; // exported and accessable in proxy client
dspContacts: TDataSetProvider; // exported and accessable in proxy client
AS_SecretDataSetProvider: TDataSetProvider; // AS_ has no effect here, exported and accessable in proxy client
dspContactsNotExported: TDataSetProvider; // NOT exported and NOT accessable in proxy client
private
{ Private declarations }
public
{ Public declarations }
function AS_AddCD(A, B : integer) : integer; // will not be in proxy client
function AddDE(A, B : integer) : integer; /// will be in proxy client, and can be accessed by anyone
{$METHODINFO ON} // has no effect on proxy client
function EchoString(AString : string) : string; // will be in proxy client, and can be accessed by anyone
function ReverseString(AString : string) : string; // will be in proxy client, and can be accessed by anyone
function ValidateUser(ALoginName, APassword : string; out AUserLevel : integer; out AUserName : string) : boolean;
[TAuthRoles('admins')]
function AddAB(A, B : integer) : integer; // will be in proxy client, and can be accessed by user with role "admins"
function AS_AddBC(A, B : integer) : integer; // will not be in proxy client
{$METHODINFO OFF} // has no effect on proxy client
end;
`
代理客戶端看起來像這樣再 `
type
TServerMethods1Client = class(TDSAdminClient)
private
FAddDECommand: TDBXCommand;
FEchoStringCommand: TDBXCommand;
FReverseStringCommand: TDBXCommand;
FValidateUserCommand: TDBXCommand;
FAddABCommand: TDBXCommand;
public
constructor Create(ADBXConnection: TDBXConnection); overload;
constructor Create(ADBXConnection: TDBXConnection; AInstanceOwner: Boolean); overload;
destructor Destroy; override;
function AddDE(A: Integer; B: Integer): Integer;
function EchoString(AString: string): string;
function ReverseString(AString: string): string;
function ValidateUser(ALoginName: string; APassword: string; out AUserLevel: Integer; out AUserName: string): Boolean;
function AddAB(A: Integer; B: Integer): Integer;
end;
`
謝謝,我們正在使用tcp comm。但是我們當然可以添加一些代理,但這並不是我想要的。 – hhaumann