Imagine you have a leg and you need to set up the IK/FK switch. If your rig is simple it can be annoying to have to set up an additional control just for the switching. It would easier if you could put the switch attribute on the actual FK or IK controls. But if we put it on the IK control then when we switch to FK mode that control won't be visible, and if we put the attribute on an FK control then we run into the same problem. If we could put it on both of them and somehow make them update each other (like a two-way connection) then that would be great.
Proxy attributes work just like that. We can put the same attribute on multiple controls and when you change or keyframe that attribute on one control may does it on all the controls. This can make your rigs a lot more animator-friendly. So how do we actually set it up? All we need to do is this:
cmds.addAttr('object_A', ln = 'testAttr', proxy = 'object_B.copiedAttr')
In the node editor this will be represented as a normal 1 way connections but it will behave like a two-way connection. If you are going to implement this in a rig I would recommend having an empty transform node with the proxied attributes on them so that all the connections go out from that node in the node editor, it's just more organized that way.
Proxy attributes are new to 2018 Maya (Or maybe it was 2017?). So if you get a error like 'invalid flag "proxy"' then you need to update Maya. If you try to open a file with proxy attributes in a version of Maya that doesn't have them it won't work.