Add a macro to reduce duplicated code in Proxy classes.
Merge pull request #101 from Ms2ger/proxy-handling

Add a macro to reduce duplicated code in Proxy classes.