Action of 1-form symmetry in Maxwell theory I am reading Lectures on Gauge Theory by David Tong.
In 3.6.2 first example that the author talk about pure $U(1)$ gauge theory in 4D. In this example, he talk about two 1-form symmetries: 
1) electric $U(1)_e$, with 2-form current $j_e \propto *F$, 
2) magnetic $U(1)_m$, with 2-form current $j_m \propto F=dA$. 
It is mentioned that the action of the electric 1-form symmetry on the gauge field $A$ is a shift by a flat connection $\lambda$, i.e., $d\lambda=0$. Exist same statement about action of the magnetic 1-form symmetry, action is shift of dual gauge field $A_D$ by a flat connection.
1) How I can calculate it? As I read in Generalized Global Symmetries, 1 forms acts on string-like objects, not on fields!! How is it agreed?
2) Is it possible derive current from Lagrangian using knowledge about action of symmetry on fields? (This question is answered)
 A: If you start with the action of Maxwell theory in four dimensions [I will denote by lowercase letters dynamical gauge fields and by uppercase, background gauge fields]
$$S[a] = \frac{1}{2}\int f\wedge\star f = \frac{1}{2}\int \mathrm{d}a\wedge\star\mathrm{d}a. \label{1}\tag{1}$$
This has a $\mathrm{U}(1)_\mathrm{e}^{[1]}$ one-form symmetry, dubbed "electric". We can see this because the transformation $a\mapsto a+\lambda$, where $\mathrm{d}\lambda=0$ leaves (\ref{1}) invariant.
You can turn on a 2-form background gauge field, $B$, for the electric one-form symmetry $\mathrm{U}(1)^{[1]}_\mathrm{e}$ similarly as you would for the $\mathrm{U}(1)$ of a compact scalar field, just this time everything is one form-degree higher. So
$$S[a,B] = \frac{1}{2}\int (\mathrm{d}a-B)\wedge\star(\mathrm{d}a - B),$$
now the equivalent of (background) gauging the symmetry is to allow for the shift of $a\mapsto a+\lambda$, to have some curvature, i.e. $\mathrm{d}\lambda\neq0$, as long as you compensate for that by a one-form gauge transformation of $B$; $B\mapsto B+\mathrm{d}\lambda$. Now, to find the current you can simply vary the action with respect to $B$, as you would in a textbook QFT and you find
$$J_\mathrm{e} := \frac{\delta S}{\delta B}\Bigg\vert_{B=0} = \star f.$$
I suppose that this answers your question, but since we came so far let's take it a little further. 
You can also turn on a 2-form background field, $C$, for the magnetic one form symmetry $\mathrm{U}(1)^{[1]}_\mathrm{m}$, by adding a term like 
$$\int C\wedge (\mathrm{d}a-B)$$
to the action. You similarly find a magnetic 2-form current
$$J_\mathrm{m} := \frac{\delta S}{\delta C}\Bigg\vert_{C=0} = f -B.$$
Without any work a mixed 't Hooft anomaly appeared, for non-zero $B$!
$$\mathrm{d}\star J_\mathrm{m} \sim \mathrm{d}\star B \neq 0.$$
And this is where all the fun starts...
